Revision 4820f894
Added by Leszek Koltunski almost 4 years ago
| src/main/java/org/distorted/solvers/SolverMain.java | ||
|---|---|---|
| 107 | 107 |
|
| 108 | 108 |
private int mapCubitToFace(int cubit, int face) |
| 109 | 109 |
{
|
| 110 |
if( cubit<8 ) return face; |
|
| 110 |
if( cubit<8 ) |
|
| 111 |
{
|
|
| 112 |
switch(face) |
|
| 113 |
{
|
|
| 114 |
case 0: return 1; |
|
| 115 |
case 1: if( cubit==2 ) return 5; |
|
| 116 |
if( cubit==1 ) return 3; |
|
| 117 |
return 1; |
|
| 118 |
case 2: return cubit==7 ? 5 : 3; |
|
| 119 |
case 3: if( cubit==1 ) return 1; |
|
| 120 |
return cubit==4 ? 5 : 3; |
|
| 121 |
case 4: return cubit==7 ? 3 : 5; |
|
| 122 |
case 5: if( cubit==2 ) return 1; |
|
| 123 |
if( cubit==4 ) return 3; |
|
| 124 |
return 5; |
|
| 125 |
} |
|
| 126 |
} |
|
| 127 |
|
|
| 111 | 128 |
if( cubit>19) return 4; |
| 112 | 129 |
|
| 113 | 130 |
switch(face) |
Also available in: Unified diff
Fix the solver.