Revision 967c1d17
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyPyraminx.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; |
... | ... | |
43 | 45 |
new Static3D(-SQ6/3,+SQ3/3, 0), |
44 | 46 |
}; |
45 | 47 |
|
48 |
private static final int[] NUM_ENABLED = {3,3,3,3}; |
|
49 |
|
|
50 |
private static final int[][][] ENABLED = new int[][][] |
|
51 |
{ |
|
52 |
{{1,2,3}},{{0,2,3}},{{0,1,3}},{{0,1,2}} |
|
53 |
}; |
|
54 |
|
|
46 | 55 |
private ScrambleState[] mStates; |
47 | 56 |
private int[] mBasicAngle; |
48 | 57 |
private Static4D[] mQuats; |
... | ... | |
135 | 144 |
{ |
136 | 145 |
if( mQuats==null ) initializeQuats(); |
137 | 146 |
int status = retCubitSolvedStatus(cubit,numLayers); |
138 |
return status<0 ? null : buildSolvedQuats(MovementPyraminx.FACE_AXIS[status],mQuats);
|
|
147 |
return status<0 ? null : buildSolvedQuats(Movement4.FACE_AXIS[status],mQuats);
|
|
139 | 148 |
} |
140 | 149 |
|
141 | 150 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
381 | 390 |
int numLayers = getNumLayers(); |
382 | 391 |
if( mCuts==null ) getCuts(numLayers); |
383 | 392 |
getLayerRotatable(numLayers); |
384 |
|
|
385 |
mMovement = new MovementPyraminx(mCuts,mLayerRotatable,numLayers); |
|
393 |
mMovement = new Movement4(ROT_AXIS,mCuts,mLayerRotatable,numLayers,TYPE_NOT_SPLIT,NUM_ENABLED,ENABLED); |
|
386 | 394 |
} |
387 | 395 |
return mMovement; |
388 | 396 |
} |
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.