Revision 348a445b
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/objects/TwistyMinx.java | ||
---|---|---|
476 | 476 |
if( ax!=oldRot[0] ) |
477 | 477 |
{ |
478 | 478 |
mPossibleAxis[index] = ax; |
479 |
boolean opposite = OPPOSITE_ROWS[oldRot[0]][ax]; |
|
480 |
boolean low = opposite^(oldRot[1]<nom); |
|
479 |
boolean low = OPPOSITE_ROWS[oldRot[0]][ax]^(oldRot[1]<nom); |
|
481 | 480 |
mPossibleLayers[index] = low ? 0:1; |
482 | 481 |
int tmp = mScrambleTable[mPossibleAxis[index]][mPossibleLayers[index]]; |
483 | 482 |
if( tmp>max ) max=tmp; |
... | ... | |
487 | 486 |
|
488 | 487 |
for(int ax=0; ax<NUM_AXIS-1; ax++) |
489 | 488 |
{ |
490 |
if( ax==0 ) |
|
491 |
{ |
|
492 |
mNumOccurences[ax] = max-mScrambleTable[mPossibleAxis[ax]][mPossibleLayers[ax]]; |
|
493 |
} |
|
494 |
else |
|
495 |
{ |
|
496 |
mNumOccurences[ax] = max-mScrambleTable[mPossibleAxis[ax]][mPossibleLayers[ax]] + mNumOccurences[ax-1]; |
|
497 |
} |
|
489 |
int value = mScrambleTable[mPossibleAxis[ax]][mPossibleLayers[ax]]; |
|
490 |
mNumOccurences[ax] = max - value + (ax==0 ? 0 : mNumOccurences[ax-1]); |
|
498 | 491 |
} |
499 | 492 |
|
500 | 493 |
float random= rnd.nextFloat(); |
Also available in: Unified diff
Minor.