Project

General

Profile

« Previous | Next » 

Revision 6cf89a3e

Added by Leszek Koltunski over 2 years ago

Introduce pseudorandom balancing into scrambling in case of the two Dinos (from now on, the more times a particular (ax,layer) combination has been chosen already in the scrambling sequence, the less likely it is to be chosen next).
Fix Dino6 - isSolved(). Sadly, it cannot be the geeneric function - it needs to be another special case.

View differences:

src/main/java/org/distorted/objects/TwistyHelicopter.java
23 23

  
24 24
import org.distorted.helpers.ObjectShape;
25 25
import org.distorted.helpers.ObjectSticker;
26
import org.distorted.helpers.ScrambleStateGraph;
26
import org.distorted.helpers.ScrambleState;
27 27
import org.distorted.library.main.DistortedEffects;
28 28
import org.distorted.library.main.DistortedTexture;
29 29
import org.distorted.library.mesh.MeshSquare;
......
238 238

  
239 239
  private int mCurrState;
240 240
  private int mIndexExcluded;
241
  private final ScrambleStateGraph[] mStates;
241
  private final ScrambleState[] mStates;
242 242

  
243 243
///////////////////////////////////////////////////////////////////////////////////////////////////
244 244

  
......
247 247
    {
248 248
    super(size, size, quat, texture, mesh, effects, moves, ObjectList.HELI, res, scrWidth);
249 249

  
250
    mStates = new ScrambleStateGraph[]
250
    mStates = new ScrambleState[]
251 251
      {
252
      new ScrambleStateGraph( new int[][] { {0,1,1,2,1,2},{0,1,3,2,1,4},{0,1,5,2,1,6},{0,1,7,2,1,8},{0,1,9,2,1,10},{0,1,11,2,1,12} } ),
253
      new ScrambleStateGraph( new int[][] { {           },{           },{0,1,5      },{0,1,7      },{      2,1,10},{       2,1,12} } ),
254
      new ScrambleStateGraph( new int[][] { {           },{           },{      2,1,6},{      2,1,8},{0,1,9       },{0,1,11       } } ),
255
      new ScrambleStateGraph( new int[][] { {           },{           },{0,1,5      },{0,1,7      },{0,1,9       },{0,1,11       } } ),
256
      new ScrambleStateGraph( new int[][] { {           },{           },{      2,1,6},{      2,1,8},{      2,1,10},{       2,1,12} } ),
257
      new ScrambleStateGraph( new int[][] { {0,1,1      },{0,1,3      },{           },{           },{0,1,9       },{       2,1,12} } ),
258
      new ScrambleStateGraph( new int[][] { {      2,1,2},{      2,1,4},{           },{           },{      2,1,10},{0,1,11       } } ),
259
      new ScrambleStateGraph( new int[][] { {0,1,1      },{0,1,3      },{           },{           },{      2,1,10},{0,1,11       } } ),
260
      new ScrambleStateGraph( new int[][] { {      2,1,2},{      2,1,4},{           },{           },{0,1,9       },{       2,1,12} } ),
261
      new ScrambleStateGraph( new int[][] { {      2,1,2},{0,1,3      },{0,1,5      },{      2,1,8},{            },{             } } ),
262
      new ScrambleStateGraph( new int[][] { {0,1,1      },{      2,1,4},{      2,1,6},{0,1,7      },{            },{             } } ),
263
      new ScrambleStateGraph( new int[][] { {      2,1,2},{0,1,3      },{      2,1,6},{0,1,7      },{            },{             } } ),
264
      new ScrambleStateGraph( new int[][] { {0,1,1      },{      2,1,4},{0,1,5      },{      2,1,8},{            },{             } } ),
252
      new ScrambleState( new int[][] { {0,1,1,2,1,2},{0,1,3,2,1,4},{0,1,5,2,1,6},{0,1,7,2,1,8},{0,1,9,2,1,10},{0,1,11,2,1,12} } ),
253
      new ScrambleState( new int[][] { {           },{           },{0,1,5      },{0,1,7      },{      2,1,10},{       2,1,12} } ),
254
      new ScrambleState( new int[][] { {           },{           },{      2,1,6},{      2,1,8},{0,1,9       },{0,1,11       } } ),
255
      new ScrambleState( new int[][] { {           },{           },{0,1,5      },{0,1,7      },{0,1,9       },{0,1,11       } } ),
256
      new ScrambleState( new int[][] { {           },{           },{      2,1,6},{      2,1,8},{      2,1,10},{       2,1,12} } ),
257
      new ScrambleState( new int[][] { {0,1,1      },{0,1,3      },{           },{           },{0,1,9       },{       2,1,12} } ),
258
      new ScrambleState( new int[][] { {      2,1,2},{      2,1,4},{           },{           },{      2,1,10},{0,1,11       } } ),
259
      new ScrambleState( new int[][] { {0,1,1      },{0,1,3      },{           },{           },{      2,1,10},{0,1,11       } } ),
260
      new ScrambleState( new int[][] { {      2,1,2},{      2,1,4},{           },{           },{0,1,9       },{       2,1,12} } ),
261
      new ScrambleState( new int[][] { {      2,1,2},{0,1,3      },{0,1,5      },{      2,1,8},{            },{             } } ),
262
      new ScrambleState( new int[][] { {0,1,1      },{      2,1,4},{      2,1,6},{0,1,7      },{            },{             } } ),
263
      new ScrambleState( new int[][] { {      2,1,2},{0,1,3      },{      2,1,6},{0,1,7      },{            },{             } } ),
264
      new ScrambleState( new int[][] { {0,1,1      },{      2,1,4},{0,1,5      },{      2,1,8},{            },{             } } ),
265 265
      };
266 266
    }
267 267

  

Also available in: Unified diff