Revision 5da7a80b
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/solvers/SolverCube3.java | ||
---|---|---|
123 | 123 |
for(int i=0; i<9; i++) |
124 | 124 |
{ |
125 | 125 |
int face = mapCubitToFace(U_INDEX[i],U); |
126 |
int color = mObject.getCubitFaceColorIndex(U_INDEX[i], face);
|
|
126 |
int color = mObject.getCubitFaceStickerIndex(U_INDEX[i], face);
|
|
127 | 127 |
objectString.append(FACE_NAMES[color]); |
128 | 128 |
} |
129 | 129 |
for(int i=0; i<9; i++) |
130 | 130 |
{ |
131 | 131 |
int face = mapCubitToFace(R_INDEX[i],R); |
132 |
int color = mObject.getCubitFaceColorIndex(R_INDEX[i], face);
|
|
132 |
int color = mObject.getCubitFaceStickerIndex(R_INDEX[i], face);
|
|
133 | 133 |
objectString.append(FACE_NAMES[color]); |
134 | 134 |
} |
135 | 135 |
for(int i=0; i<9; i++) |
136 | 136 |
{ |
137 | 137 |
int face = mapCubitToFace(F_INDEX[i],F); |
138 |
int color = mObject.getCubitFaceColorIndex(F_INDEX[i], face);
|
|
138 |
int color = mObject.getCubitFaceStickerIndex(F_INDEX[i], face);
|
|
139 | 139 |
objectString.append(FACE_NAMES[color]); |
140 | 140 |
} |
141 | 141 |
for(int i=0; i<9; i++) |
142 | 142 |
{ |
143 | 143 |
int face = mapCubitToFace(D_INDEX[i],D); |
144 |
int color = mObject.getCubitFaceColorIndex(D_INDEX[i], face);
|
|
144 |
int color = mObject.getCubitFaceStickerIndex(D_INDEX[i], face);
|
|
145 | 145 |
objectString.append(FACE_NAMES[color]); |
146 | 146 |
} |
147 | 147 |
for(int i=0; i<9; i++) |
148 | 148 |
{ |
149 | 149 |
int face = mapCubitToFace(L_INDEX[i],L); |
150 |
int color = mObject.getCubitFaceColorIndex(L_INDEX[i], face);
|
|
150 |
int color = mObject.getCubitFaceStickerIndex(L_INDEX[i], face);
|
|
151 | 151 |
objectString.append(FACE_NAMES[color]); |
152 | 152 |
} |
153 | 153 |
for(int i=0; i<9; i++) |
154 | 154 |
{ |
155 | 155 |
int face = mapCubitToFace(B_INDEX[i],B); |
156 |
int color = mObject.getCubitFaceColorIndex(B_INDEX[i], face);
|
|
156 |
int color = mObject.getCubitFaceStickerIndex(B_INDEX[i], face);
|
|
157 | 157 |
objectString.append(FACE_NAMES[color]); |
158 | 158 |
} |
159 | 159 |
|
src/main/java/org/distorted/solvers/SolverMain.java | ||
---|---|---|
77 | 77 |
SolverCube3 solver = new SolverCube3(mRes,mObject); |
78 | 78 |
solver.solve(screen); |
79 | 79 |
} |
80 |
if( mSignature==ObjectSignatures.PDUO_2 ) |
|
80 |
else if( mSignature==ObjectSignatures.PDUO_2 )
|
|
81 | 81 |
{ |
82 | 82 |
SolverTablebase solver = new SolverPyraminxDuo(mRes,mObject); |
83 | 83 |
solver.solve(screen); |
src/main/java/org/distorted/solvers/pduo/SolverPyraminxDuo.java | ||
---|---|---|
48 | 48 |
|
49 | 49 |
public int[] prepareQuats(TwistyObject object) |
50 | 50 |
{ |
51 |
int c0f0 = object.getCubitFaceColorIndex(0,0);
|
|
52 |
int c0f1 = object.getCubitFaceColorIndex(0,1);
|
|
53 |
int c0f2 = object.getCubitFaceColorIndex(0,2);
|
|
54 |
|
|
55 |
int c1f0 = object.getCubitFaceColorIndex(1,0);
|
|
56 |
int c1f1 = object.getCubitFaceColorIndex(1,1);
|
|
57 |
int c1f2 = object.getCubitFaceColorIndex(1,2);
|
|
58 |
|
|
59 |
int c2f0 = object.getCubitFaceColorIndex(2,0);
|
|
60 |
int c2f1 = object.getCubitFaceColorIndex(2,1);
|
|
61 |
int c2f2 = object.getCubitFaceColorIndex(2,2);
|
|
62 |
|
|
63 |
int c3f0 = object.getCubitFaceColorIndex(3,0);
|
|
64 |
int c3f1 = object.getCubitFaceColorIndex(3,1);
|
|
65 |
int c3f2 = object.getCubitFaceColorIndex(3,2);
|
|
66 |
|
|
67 |
int c4f0 = object.getCubitFaceColorIndex(4,0);
|
|
68 |
int c5f0 = object.getCubitFaceColorIndex(5,0);
|
|
69 |
int c6f0 = object.getCubitFaceColorIndex(6,0);
|
|
70 |
int c7f0 = object.getCubitFaceColorIndex(3,0);
|
|
51 |
int c0f0 = object.getCubitFaceStickerIndex(0,0);
|
|
52 |
int c0f1 = object.getCubitFaceStickerIndex(0,1);
|
|
53 |
int c0f2 = object.getCubitFaceStickerIndex(0,2);
|
|
54 |
|
|
55 |
int c1f0 = object.getCubitFaceStickerIndex(1,0);
|
|
56 |
int c1f1 = object.getCubitFaceStickerIndex(1,1);
|
|
57 |
int c1f2 = object.getCubitFaceStickerIndex(1,2);
|
|
58 |
|
|
59 |
int c2f0 = object.getCubitFaceStickerIndex(2,0);
|
|
60 |
int c2f1 = object.getCubitFaceStickerIndex(2,1);
|
|
61 |
int c2f2 = object.getCubitFaceStickerIndex(2,2);
|
|
62 |
|
|
63 |
int c3f0 = object.getCubitFaceStickerIndex(3,0);
|
|
64 |
int c3f1 = object.getCubitFaceStickerIndex(3,1);
|
|
65 |
int c3f2 = object.getCubitFaceStickerIndex(3,2);
|
|
66 |
|
|
67 |
int c4f0 = object.getCubitFaceStickerIndex(4,0);
|
|
68 |
int c5f0 = object.getCubitFaceStickerIndex(5,0);
|
|
69 |
int c6f0 = object.getCubitFaceStickerIndex(6,0);
|
|
70 |
int c7f0 = object.getCubitFaceStickerIndex(7,0);
|
|
71 | 71 |
|
72 | 72 |
android.util.Log.e("D", "tip 0: "+c0f0+" "+c0f1+" "+c0f2); |
73 | 73 |
android.util.Log.e("D", "tip 1: "+c1f0+" "+c1f1+" "+c1f2); |
Also available in: Unified diff
Progress with PDuo solver