Revision 967c1d17
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyIvy.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 = {1,1,1,1,1,1}; |
|
49 |
|
|
50 |
private static final int[][][] ENABLED = new int[][][] |
|
51 |
{ |
|
52 |
{{0},{3},{3},{0}}, |
|
53 |
{{2},{1},{1},{2}}, |
|
54 |
{{2},{0},{0},{2}}, |
|
55 |
{{1},{3},{3},{1}}, |
|
56 |
{{0},{0},{1},{1}}, |
|
57 |
{{2},{2},{3},{3}}, |
|
58 |
}; |
|
59 |
|
|
46 | 60 |
private static final int NUM_STICKERS = 2; |
47 | 61 |
public static final float IVY_D = 0.006f; |
48 | 62 |
private static final int IVY_N = 8; |
... | ... | |
109 | 123 |
{ |
110 | 124 |
if( mQuats==null ) initializeQuats(); |
111 | 125 |
int status = retCubitSolvedStatus(cubit,numLayers); |
112 |
return status<0 ? null : buildSolvedQuats(MovementIvy.FACE_AXIS[status],mQuats);
|
|
126 |
return status<0 ? null : buildSolvedQuats(Movement6.FACE_AXIS[status],mQuats);
|
|
113 | 127 |
} |
114 | 128 |
|
115 | 129 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
446 | 460 |
int numLayers = getNumLayers(); |
447 | 461 |
if( mCuts==null ) getCuts(numLayers); |
448 | 462 |
getLayerRotatable(numLayers); |
449 |
|
|
450 |
mMovement = new MovementIvy(mCuts,mLayerRotatable,numLayers); |
|
463 |
mMovement = new Movement6(ROT_AXIS,mCuts,mLayerRotatable,numLayers,TYPE_SPLIT_CORNER,NUM_ENABLED,ENABLED); |
|
451 | 464 |
} |
452 | 465 |
return mMovement; |
453 | 466 |
} |
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.