Revision 967c1d17
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyRex.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.objects; |
21 | 21 |
|
22 |
import static org.distorted.objects.Movement.TYPE_SPLIT_CORNER; |
|
23 |
|
|
22 | 24 |
import android.content.res.Resources; |
23 | 25 |
|
24 | 26 |
import org.distorted.helpers.ObjectShape; |
... | ... | |
43 | 45 |
new Static3D(+SQ3/3,-SQ3/3,-SQ3/3) |
44 | 46 |
}; |
45 | 47 |
|
48 |
private static final int[] NUM_ENABLED = {2,2,2,2,2,2}; |
|
49 |
|
|
50 |
private static final int[][][] ENABLED = new int[][][] |
|
51 |
{ |
|
52 |
{{0,1},{3,1},{2,3},{0,2}}, |
|
53 |
{{2,3},{3,1},{0,1},{0,2}}, |
|
54 |
{{1,2},{0,1},{0,3},{2,3}}, |
|
55 |
{{1,2},{2,3},{0,3},{0,1}}, |
|
56 |
{{0,3},{0,2},{1,2},{1,3}}, |
|
57 |
{{1,2},{0,2},{0,3},{1,3}}, |
|
58 |
}; |
|
59 |
|
|
46 | 60 |
public static final float REX_D = 0.2f; |
47 | 61 |
|
48 | 62 |
private ScrambleState[] mStates; |
... | ... | |
107 | 121 |
{ |
108 | 122 |
if( mQuats==null ) initializeQuats(); |
109 | 123 |
int status = retCubitSolvedStatus(cubit,numLayers); |
110 |
return status<0 ? null : buildSolvedQuats(MovementCornerTwisting.FACE_AXIS[status],mQuats);
|
|
124 |
return status<0 ? null : buildSolvedQuats(Movement6.FACE_AXIS[status],mQuats);
|
|
111 | 125 |
} |
112 | 126 |
|
113 | 127 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
449 | 463 |
int numLayers = getNumLayers(); |
450 | 464 |
if( mCuts==null ) getCuts(numLayers); |
451 | 465 |
getLayerRotatable(numLayers); |
452 |
|
|
453 |
mMovement = new MovementCornerTwisting(mCuts,mLayerRotatable,numLayers); |
|
466 |
mMovement = new Movement6(ROT_AXIS,mCuts,mLayerRotatable,numLayers,TYPE_SPLIT_CORNER,NUM_ENABLED,ENABLED); |
|
454 | 467 |
} |
455 | 468 |
return mMovement; |
456 | 469 |
} |
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.