Revision 9ba7f3f6
Added by Leszek Koltunski over 1 year ago
src/main/java/org/distorted/objectlib/objects/TwistyUltimate.java | ||
---|---|---|
21 | 21 |
import org.distorted.objectlib.helpers.ObjectFaceShape; |
22 | 22 |
import org.distorted.objectlib.helpers.ObjectSignature; |
23 | 23 |
import org.distorted.objectlib.helpers.ObjectVertexEffects; |
24 |
import org.distorted.objectlib.scrambling.ScrambleEdgeGenerator; |
|
24 | 25 |
import org.distorted.objectlib.main.InitData; |
25 | 26 |
import org.distorted.objectlib.touchcontrol.TouchControlDodecahedron; |
26 | 27 |
import org.distorted.objectlib.main.ObjectType; |
27 | 28 |
import org.distorted.objectlib.helpers.ObjectShape; |
28 |
import org.distorted.objectlib.scrambling.ScrambleState; |
|
29 | 29 |
import org.distorted.objectlib.shape.ShapeDodecahedron; |
30 | 30 |
|
31 | 31 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
47 | 47 |
new Static3D( 0,C,-B) |
48 | 48 |
}; |
49 | 49 |
|
50 |
private ScrambleState[] mStates;
|
|
50 |
private int[][] mEdges;
|
|
51 | 51 |
private int[][] mBasicAngle; |
52 | 52 |
private float[][] mCuts; |
53 | 53 |
private float[][] mPositions; |
... | ... | |
62 | 62 |
|
63 | 63 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
64 | 64 |
|
65 |
public ScrambleState[] getScrambleStates()
|
|
65 |
public int[][] getScrambleEdges()
|
|
66 | 66 |
{ |
67 |
if( mStates==null ) |
|
68 |
{ |
|
69 |
int[] tmp = {0,-1,0, 0,1,0, 1,-1,0, 1,1,0 }; |
|
70 |
|
|
71 |
mStates = new ScrambleState[] |
|
72 |
{ |
|
73 |
new ScrambleState( new int[][] {tmp,tmp,tmp,tmp} ) |
|
74 |
}; |
|
75 |
} |
|
76 |
|
|
77 |
return mStates; |
|
67 |
if( mEdges==null ) mEdges = ScrambleEdgeGenerator.getScrambleEdgesSingle(mBasicAngle); |
|
68 |
return mEdges; |
|
78 | 69 |
} |
79 | 70 |
|
80 | 71 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Move scrambling to a new model where there are spearete scrambling 'algorithms' and 'edges' of the scrambling graph.
Now each edge can contain a whole algorithm, i.e. a sequence of moves leading from state to state, which permits construction of scrambling for more complicated bandaged objects such as the AI cube.
Unchecked as of yet, probably still a lot of bugs.