Project

General

Profile

« Previous | Next » 

Revision 144fa403

Added by Leszek Koltunski over 1 year ago

CU_323 solver: corrections.

View differences:

src/main/java/org/distorted/solvers/SolverCuboid323.java
87 87
      }
88 88
    }
89 89

  
90
///////////////////////////////////////////////////////////////////////////////////////////////////
91

  
92
  private boolean isFrontEdgeInItsPlace(int[][] edges)
93
    {
94
    return edges[1][1]==mFaceColors[3];
95
    }
96

  
97 90
///////////////////////////////////////////////////////////////////////////////////////////////////
98 91

  
99 92
  public SolverCuboid323(OperatingSystemInterface os, Resources res, TwistyObject object)
......
344 337
    int result2 = retEdgePermutation(edge_perm8,edges);
345 338
    if( result2<0 ) return result2;
346 339

  
347
    TablebaseHelpers.displayTable(corner_perm, "CORNER PERM");
348
    TablebaseHelpers.displayTable(edge_perm8, "EDGE PERM8");
340
    TablebaseHelpers.displayTable(corner_perm, "CORNER PERM (before norm)");
341
    TablebaseHelpers.displayTable(edge_perm8, "EDGE PERM8 (before norm)");
349 342

  
350 343
    normalizePermutations(corner_perm,edge_perm8);
351 344

  
345
    TablebaseHelpers.displayTable(corner_perm, "CORNER PERM (after norm)");
346
    TablebaseHelpers.displayTable(edge_perm8, "EDGE PERM8 (after norm)");
347

  
352 348
    int[] edge_perm7 = TBCuboid323.edgePermTo7(edge_perm8);
353 349

  
354 350
TablebaseHelpers.displayTable(edge_perm7, "EDGE PERM7");
355 351

  
356 352
    int corner_perm_num = TablebaseHelpers.computePermutationNum(corner_perm);
357 353
    int edge_perm_num = TablebaseHelpers.computePermutationNum(edge_perm7);
358
    boolean inPlace = isFrontEdgeInItsPlace(edges);
354
    boolean inPlace = TBCuboid323.isFrontEdgeInItsPlace(edge_perm8);
359 355

  
360 356
android.util.Log.e("D", "corner_perm_num: "+corner_perm_num+" edge_perm_num: "+edge_perm_num+" inPlace: "+inPlace);
361 357
android.util.Log.e("D", "index="+(corner_perm_num + 40320*( (inPlace?0:1) + 2*edge_perm_num)));

Also available in: Unified diff