Revision 967c1d17
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyBandagedAbstract.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 |
{2,2,2} |
52 | 54 |
}; |
53 | 55 |
|
56 |
private static final int[] NUM_ENABLED = {2,2,2,2,2,2}; |
|
57 |
|
|
58 |
private static final int[][][] ENABLED = new int[][][] |
|
59 |
{ |
|
60 |
{{1,2}},{{1,2}},{{0,2}},{{0,2}},{{0,1}},{{0,1}}, |
|
61 |
}; |
|
62 |
|
|
54 | 63 |
private static final int NUM_STICKERS = 4; |
55 | 64 |
|
56 | 65 |
private int[] mBasicAngle; |
... | ... | |
120 | 129 |
{ |
121 | 130 |
if( mQuats==null ) initializeQuats(); |
122 | 131 |
int status = retCubitSolvedStatus(cubit,numLayers); |
123 |
return status<0 ? null : buildSolvedQuats(MovementCube.FACE_AXIS[status],mQuats);
|
|
132 |
return status<0 ? null : buildSolvedQuats(Movement6.FACE_AXIS[status],mQuats);
|
|
124 | 133 |
} |
125 | 134 |
|
126 | 135 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
457 | 466 |
int numLayers = getNumLayers(); |
458 | 467 |
if( mCuts==null ) getCuts(numLayers); |
459 | 468 |
getLayerRotatable(numLayers); |
460 |
|
|
461 |
mMovement = new MovementCube(mCuts,mLayerRotatable,numLayers); |
|
469 |
mMovement = new Movement6(ROT_AXIS,mCuts,mLayerRotatable,numLayers,TYPE_NOT_SPLIT,NUM_ENABLED,ENABLED); |
|
462 | 470 |
} |
463 | 471 |
return mMovement; |
464 | 472 |
} |
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.