Project

General

Profile

« Previous | Next » 

Revision 09b2bd31

Added by Leszek Koltunski about 3 years ago

make numLayers into an int[] (preparation for Cuboids)
Caution: because of previous changes to cubit order in cube, the Solver is broken!

View differences:

src/main/java/org/distorted/solvers/SolverMain.java
53 53
    {
54 54
    if( object == ObjectType.CUBE_3 )
55 55
      {
56
      if( cubit==21 ) return 0; // center of the right  face
57
      if( cubit== 4 ) return 1; // center of the left   face
58
      if( cubit==15 ) return 2; // center of the up     face
59
      if( cubit==10 ) return 3; // center of the bottom face
60
      if( cubit==13 ) return 4; // center of the front  face
61
      if( cubit==12 ) return 5; // center of the back   face
56
      if( cubit==20 ) return 0; // center of the right  face
57
      if( cubit==21 ) return 1; // center of the left   face
58
      if( cubit==22 ) return 2; // center of the up     face
59
      if( cubit==23 ) return 3; // center of the bottom face
60
      if( cubit==24 ) return 4; // center of the front  face
61
      if( cubit==25 ) return 5; // center of the back   face
62 62
      }
63 63

  
64 64
    return -1;
......
127 127
  private String prepareCube3position()
128 128
    {
129 129
    StringBuilder objectString = new StringBuilder();
130
    int layers = mObject.getNumLayers();
130
    int layers = 3;
131 131
    int len = layers*layers;
132 132
    int cubitIndex, row, col, color,face;
133 133

  

Also available in: Unified diff