Revision 1701e7ae
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/patterns/RubikPattern.java | ||
---|---|---|
403 | 403 |
digit2 = moves.charAt(4*i+3)-'0'; |
404 | 404 |
number = 100*digit0+10*digit1+digit2; |
405 | 405 |
|
406 |
result[i][0] = (number/32)%4; |
|
407 |
result[i][1] = (number%32) ; |
|
408 |
result[i][2] =2-(number/32)/4; |
|
406 |
result[i][0] = (number/32)%4; // axis
|
|
407 |
result[i][1] = (number%32) ; // bitmap
|
|
408 |
result[i][2] =2-(number/32)/4; // angle
|
|
409 | 409 |
} |
410 | 410 |
} |
411 | 411 |
|
src/main/java/org/distorted/solvers/cube3/Search.java | ||
---|---|---|
47 | 47 |
switch (ax[i]) { |
48 | 48 |
case 0: switch(po[i]) |
49 | 49 |
{ |
50 |
case 1: s+=" 363"; break;
|
|
51 |
case 2: s+=" 364"; break;
|
|
52 |
case 3: s+=" 361"; break;
|
|
50 |
case 1: s+=" 420"; break;
|
|
51 |
case 2: s+=" 548"; break;
|
|
52 |
case 3: s+=" 164"; break;
|
|
53 | 53 |
} |
54 | 54 |
break; |
55 | 55 |
case 1: switch(po[i]) |
56 | 56 |
{ |
57 |
case 1: s+=" 043"; break;
|
|
58 |
case 2: s+=" 044"; break;
|
|
59 |
case 3: s+=" 041"; break;
|
|
57 |
case 1: s+=" 388"; break;
|
|
58 |
case 2: s+=" 516"; break;
|
|
59 |
case 3: s+=" 132"; break;
|
|
60 | 60 |
} |
61 | 61 |
break; |
62 | 62 |
case 2: switch(po[i]) |
63 | 63 |
{ |
64 |
case 1: s+=" 683"; break;
|
|
65 |
case 2: s+=" 684"; break;
|
|
66 |
case 3: s+=" 681"; break;
|
|
64 |
case 1: s+=" 452"; break;
|
|
65 |
case 2: s+=" 580"; break;
|
|
66 |
case 3: s+=" 196"; break;
|
|
67 | 67 |
} |
68 | 68 |
break; |
69 | 69 |
case 3: switch(po[i]) |
70 | 70 |
{ |
71 |
case 1: s+=" 331"; break;
|
|
72 |
case 2: s+=" 330"; break;
|
|
73 |
case 3: s+=" 333"; break;
|
|
71 |
case 1: s+=" 161"; break;
|
|
72 |
case 2: s+=" 033"; break;
|
|
73 |
case 3: s+=" 417"; break;
|
|
74 | 74 |
} |
75 | 75 |
break; |
76 | 76 |
case 4: switch(po[i]) |
77 | 77 |
{ |
78 |
case 1: s+=" 011"; break;
|
|
79 |
case 2: s+=" 010"; break;
|
|
80 |
case 3: s+=" 013"; break;
|
|
78 |
case 1: s+=" 129"; break;
|
|
79 |
case 2: s+=" 001"; break;
|
|
80 |
case 3: s+=" 385"; break;
|
|
81 | 81 |
} |
82 | 82 |
break; |
83 | 83 |
case 5: switch(po[i]) |
84 | 84 |
{ |
85 |
case 1: s+=" 651"; break;
|
|
86 |
case 2: s+=" 650"; break;
|
|
87 |
case 3: s+=" 653"; break;
|
|
85 |
case 1: s+=" 193"; break;
|
|
86 |
case 2: s+=" 065"; break;
|
|
87 |
case 3: s+=" 449"; break;
|
|
88 | 88 |
} |
89 | 89 |
break; |
90 | 90 |
} |
Also available in: Unified diff
Fix the Solver broken by the change of move notation when importing Pyraminx Patterns :(