Revision 967c1d17
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyCube.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.objects; |
21 | 21 |
|
22 |
import static org.distorted.objects.Movement.TYPE_NOT_SPLIT; |
|
23 |
|
|
22 | 24 |
import android.content.res.Resources; |
23 | 25 |
|
24 | 26 |
import org.distorted.helpers.ObjectShape; |
... | ... | |
42 | 44 |
new Static3D(0,0,1) |
43 | 45 |
}; |
44 | 46 |
|
47 |
private static final int[] NUM_ENABLED = {2,2,2,2,2,2}; |
|
48 |
|
|
49 |
private static final int[][][] ENABLED = new int[][][] |
|
50 |
{ |
|
51 |
{{1,2}},{{1,2}},{{0,2}},{{0,2}},{{0,1}},{{0,1}}, |
|
52 |
}; |
|
53 |
|
|
45 | 54 |
private ScrambleState[] mStates; |
46 | 55 |
private Static4D[] mQuats; |
47 | 56 |
private float[][] mCuts; |
... | ... | |
155 | 164 |
{ |
156 | 165 |
if( mQuats ==null ) initializeQuats(); |
157 | 166 |
int status = retCubitSolvedStatus(cubit,numLayers); |
158 |
return status<0 ? null : buildSolvedQuats(MovementCube.FACE_AXIS[status], mQuats);
|
|
167 |
return status<0 ? null : buildSolvedQuats(Movement6.FACE_AXIS[status], mQuats);
|
|
159 | 168 |
} |
160 | 169 |
|
161 | 170 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
354 | 363 |
int numLayers = getNumLayers(); |
355 | 364 |
if( mCuts==null ) getCuts(numLayers); |
356 | 365 |
getLayerRotatable(numLayers); |
357 |
|
|
358 |
mMovement = new MovementCube(mCuts,mLayerRotatable,numLayers); |
|
366 |
mMovement = new Movement6(ROT_AXIS,mCuts,mLayerRotatable,numLayers,TYPE_NOT_SPLIT,NUM_ENABLED,ENABLED); |
|
359 | 367 |
} |
360 | 368 |
return mMovement; |
361 | 369 |
} |
Also available in: Unified diff
Do away with the last method in the object Movement classes. Remove the object Movement classes altogether.
From now on the implementation of a TwistyPuzzle is 100% data, no code at all.
Next step: make the implementation a (generated?) (XML?) file.