Revision 967c1d17
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyHelicopter.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.objects; |
21 | 21 |
|
22 |
import static org.distorted.objects.Movement.TYPE_SPLIT_EDGE; |
|
23 |
|
|
22 | 24 |
import android.content.res.Resources; |
23 | 25 |
|
24 | 26 |
import org.distorted.helpers.ObjectShape; |
... | ... | |
46 | 48 |
new Static3D(-SQ2/2, -SQ2/2, 0) |
47 | 49 |
}; |
48 | 50 |
|
51 |
private static final int[] NUM_ENABLED = {2,2,2,2,2,2}; |
|
52 |
|
|
53 |
private static final int[][][] ENABLED = new int[][][] |
|
54 |
{ |
|
55 |
{{2,5},{2,4},{3,4},{3,5}}, |
|
56 |
{{2,4},{2,5},{3,5},{3,4}}, |
|
57 |
{{0,5},{1,5},{1,4},{0,4}}, |
|
58 |
{{0,4},{1,4},{1,5},{0,5}}, |
|
59 |
{{1,3},{0,3},{0,2},{1,2}}, |
|
60 |
{{0,3},{1,3},{1,2},{0,2}}, |
|
61 |
}; |
|
62 |
|
|
49 | 63 |
private ScrambleState[] mStates; |
50 | 64 |
private int[] mBasicAngle; |
51 | 65 |
private Static4D[] mQuats; |
... | ... | |
133 | 147 |
{ |
134 | 148 |
if( mQuats==null ) initializeQuats(); |
135 | 149 |
int status = retCubitSolvedStatus(cubit,numLayers); |
136 |
return status<0 ? null : buildSolvedQuats(MovementHelicopter.FACE_AXIS[status],mQuats);
|
|
150 |
return status<0 ? null : buildSolvedQuats(Movement6.FACE_AXIS[status],mQuats);
|
|
137 | 151 |
} |
138 | 152 |
|
139 | 153 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
419 | 433 |
int numLayers = getNumLayers(); |
420 | 434 |
if( mCuts==null ) getCuts(numLayers); |
421 | 435 |
getLayerRotatable(numLayers); |
422 |
|
|
423 |
mMovement = new MovementHelicopter(mCuts,mLayerRotatable,numLayers); |
|
436 |
mMovement = new Movement6(ROT_AXIS,mCuts,mLayerRotatable,numLayers,TYPE_SPLIT_EDGE,NUM_ENABLED,ENABLED); |
|
424 | 437 |
} |
425 | 438 |
return mMovement; |
426 | 439 |
} |
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.