Revision 8db55f55
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyDino6.java | ||
---|---|---|
112 | 112 |
} |
113 | 113 |
else |
114 | 114 |
{ |
115 |
int newVector = rnd.nextInt(NUM_AXIS -1);
|
|
115 |
int newVector = rnd.nextInt(NUM_AXIS-1); |
|
116 | 116 |
scramble[curr][0] = (newVector>=scramble[curr-1][0] ? newVector+1 : newVector); |
117 | 117 |
scramble[curr][1] = scramble[curr-1][0]+scramble[curr][0]==3 ? 2-scramble[curr-1][1] : scramble[curr-1][1]; |
118 | 118 |
} |
Also available in: Unified diff
Preparation for unification of scrambling. Scrambling of all objects will be done by a generic funtion, only fed a certain data structure by the objects. The data structure is going to be the ScrambleStateGraph - a directed state graph of all states we can come across while scrambling.
Make the ScrambleStateGraph support any number of axis, not only 3 as it did up till now. Also, correct one problem in BangadageCubeEvil's StageGraph: its state number 114 was incorrect, missing one move.