Revision 967c1d17
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyUltimate.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; |
... | ... | |
51 | 53 |
new Static3D( 0,C,-B) |
52 | 54 |
}; |
53 | 55 |
|
56 |
private static final int[] NUM_ENABLED = {2,2,2,2,2,2,2,2,2,2,2,2}; |
|
57 |
|
|
58 |
private static final int[][][] ENABLED = new int[][][] |
|
59 |
{ |
|
60 |
{{2,3}},{{1,3}},{{1,3}},{{2,3}},{{0,3}},{{0,2}},{{0,2}},{{0,3}},{{1,2}},{{0,1}},{{0,1}},{{1,2}} |
|
61 |
}; |
|
62 |
|
|
54 | 63 |
private ScrambleState[] mStates; |
55 | 64 |
private int[] mBasicAngle; |
56 | 65 |
private Static4D[] mQuats; |
... | ... | |
114 | 123 |
{ |
115 | 124 |
if( mQuats==null ) initializeQuats(); |
116 | 125 |
int status = retCubitSolvedStatus(cubit,numLayers); |
117 |
return status<0 ? null : buildSolvedQuats(MovementUltimate.FACE_AXIS[status],mQuats);
|
|
126 |
return status<0 ? null : buildSolvedQuats(Movement12.FACE_AXIS[status],mQuats);
|
|
118 | 127 |
} |
119 | 128 |
|
120 | 129 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
409 | 418 |
int numLayers = getNumLayers(); |
410 | 419 |
if( mCuts==null ) getCuts(numLayers); |
411 | 420 |
getLayerRotatable(numLayers); |
412 |
|
|
413 |
mMovement = new MovementUltimate(mCuts,mLayerRotatable,numLayers); |
|
421 |
mMovement = new Movement12(ROT_AXIS,mCuts,mLayerRotatable,numLayers,TYPE_NOT_SPLIT,NUM_ENABLED,ENABLED); |
|
414 | 422 |
} |
415 | 423 |
return mMovement; |
416 | 424 |
} |
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.