Revision 9ba7f3f6
Added by Leszek Koltunski over 1 year ago
src/main/java/org/distorted/objectlib/objects/TwistyContainer.java | ||
---|---|---|
18 | 18 |
import org.distorted.objectlib.helpers.ObjectShape; |
19 | 19 |
import org.distorted.objectlib.helpers.ObjectSignature; |
20 | 20 |
import org.distorted.objectlib.helpers.ObjectVertexEffects; |
21 |
import org.distorted.objectlib.scrambling.ScrambleEdgeGenerator; |
|
21 | 22 |
import org.distorted.objectlib.main.InitData; |
22 |
import org.distorted.objectlib.scrambling.ScrambleState; |
|
23 | 23 |
import org.distorted.objectlib.main.ObjectType; |
24 | 24 |
import org.distorted.objectlib.shape.ShapeHexahedron; |
25 | 25 |
import org.distorted.objectlib.touchcontrol.TouchControlHexahedron; |
... | ... | |
39 | 39 |
new Static3D( 0.0f, SQ3/3, SQ6/3) |
40 | 40 |
}; |
41 | 41 |
|
42 |
private ScrambleState[] mStates;
|
|
42 |
private int[][] mEdges;
|
|
43 | 43 |
private int[][] mBasicAngle; |
44 | 44 |
private float[][] mCuts; |
45 | 45 |
private int[][] mFaceMap; |
... | ... | |
85 | 85 |
|
86 | 86 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
87 | 87 |
|
88 |
public ScrambleState[] getScrambleStates()
|
|
88 |
public int[][] getScrambleEdges()
|
|
89 | 89 |
{ |
90 |
if( mStates==null ) |
|
91 |
{ |
|
92 |
int[] tmp = {0,-1,0, 0,1,0, 1,-1,0, 1,1,0 }; |
|
93 |
|
|
94 |
mStates = new ScrambleState[] |
|
95 |
{ |
|
96 |
new ScrambleState( new int[][] {tmp,tmp,tmp,tmp} ) |
|
97 |
}; |
|
98 |
} |
|
99 |
|
|
100 |
return mStates; |
|
90 |
if( mEdges==null ) mEdges = ScrambleEdgeGenerator.getScrambleEdgesSingle(mBasicAngle); |
|
91 |
return mEdges; |
|
101 | 92 |
} |
102 | 93 |
|
103 | 94 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
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.