Revision a57e6870
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyMinx.java | ||
---|---|---|
96 | 96 |
|
97 | 97 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
98 | 98 |
|
99 |
TwistyMinx(int numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
99 |
TwistyMinx(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
|
|
100 | 100 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth) |
101 | 101 |
{ |
102 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
|
|
102 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
103 | 103 |
} |
104 | 104 |
|
105 | 105 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
108 | 108 |
{ |
109 | 109 |
if( mStates==null ) |
110 | 110 |
{ |
111 |
int numLayers = getNumLayers(); |
|
112 |
initializeScrambleStates(numLayers); |
|
111 |
int[] numLayers = getNumLayers();
|
|
112 |
initializeScrambleStates(numLayers[0]);
|
|
113 | 113 |
} |
114 | 114 |
|
115 | 115 |
return mStates; |
... | ... | |
511 | 511 |
|
512 | 512 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
513 | 513 |
|
514 |
protected int[] getSolvedQuats(int cubit, int numLayers) |
|
514 |
protected int[] getSolvedQuats(int cubit, int[] numLayers)
|
|
515 | 515 |
{ |
516 | 516 |
if( mQuats==null ) initializeQuats(); |
517 | 517 |
if( mFaceMap==null ) mFaceMap = new int[] {8,10,3,7,1,9,11,2,4,0,5,6}; |
... | ... | |
566 | 566 |
|
567 | 567 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
568 | 568 |
|
569 |
private void getLayerRotatable(int numLayers) |
|
569 |
private void getLayerRotatable(int[] numLayers)
|
|
570 | 570 |
{ |
571 | 571 |
if( mLayerRotatable==null ) |
572 | 572 |
{ |
573 | 573 |
int numAxis = ROT_AXIS.length; |
574 |
boolean[] tmp = new boolean[numLayers]; |
|
575 |
for(int i=0; i<numLayers; i++) tmp[i] = true; |
|
576 |
tmp[numLayers/2] = false; |
|
577 | 574 |
mLayerRotatable = new boolean[numAxis][]; |
578 |
for(int i=0; i<numAxis; i++) mLayerRotatable[i] = tmp; |
|
575 |
|
|
576 |
for(int i=0; i<numAxis; i++) |
|
577 |
{ |
|
578 |
mLayerRotatable[i] = new boolean[numLayers[i]]; |
|
579 |
for(int j=0; j<numLayers[i]; j++) mLayerRotatable[i][j] = true; |
|
580 |
mLayerRotatable[i][numLayers[i]/2] = false; |
|
581 |
} |
|
579 | 582 |
} |
580 | 583 |
} |
581 | 584 |
|
... | ... | |
607 | 610 |
{ |
608 | 611 |
if( mMovement==null ) |
609 | 612 |
{ |
610 |
int numLayers = getNumLayers(); |
|
613 |
int[] numLayers = getNumLayers();
|
|
611 | 614 |
if( mCuts==null ) getCuts(numLayers); |
612 | 615 |
getLayerRotatable(numLayers); |
613 |
mMovement = new Movement12(ROT_AXIS,mCuts,mLayerRotatable,numLayers,TYPE_SPLIT_EDGE,ENABLED); |
|
616 |
mMovement = new Movement12(ROT_AXIS,mCuts,mLayerRotatable,numLayers[0],TYPE_SPLIT_EDGE,ENABLED);
|
|
614 | 617 |
} |
615 | 618 |
|
616 | 619 |
return mMovement; |
Also available in: Unified diff
make numLayers into an int[] (preparation for Cuboids)
Caution: because of previous changes to cubit order in cube, the Solver is broken!