Revision 00057bb1
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/objectlib/scrambling/ObjectScrambler.java | ||
---|---|---|
57 | 57 |
private BlacklistedSignatures mBlacklisted; |
58 | 58 |
|
59 | 59 |
// type==3 (tablebases) |
60 |
private TablebasesAbstract mTablebase; |
|
60 |
private final TablebasesAbstract mTablebase;
|
|
61 | 61 |
|
62 | 62 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
63 | 63 |
|
... | ... | |
147 | 147 |
|
148 | 148 |
int[] algorithm = mAlgorithms[mCurrAlgorithm]; |
149 | 149 |
scramble[curr][0] = algorithm[mCurrStep ]; |
150 |
scramble[curr][1] = algorithm[mCurrStep+1];
|
|
150 |
scramble[curr][1] = (1<<algorithm[mCurrStep+1]);
|
|
151 | 151 |
scramble[curr][2] = algorithm[mCurrStep+2]; |
152 | 152 |
|
153 | 153 |
mAxisExcluded = algorithm[0]; |
... | ... | |
401 | 401 |
scramble[curr][2] = nextAngle; |
402 | 402 |
mLastRot = layer==0 ? LAST_LO : LAST_UP; |
403 | 403 |
updateCornerQuats(scramble[curr]); |
404 |
scramble[curr][1] = (1<<scramble[curr][1]); |
|
404 | 405 |
break; |
405 | 406 |
case LAST_LO: |
406 | 407 |
case LAST_UP: layer = mLastRot==LAST_LO ? 1:0; |
... | ... | |
412 | 413 |
scramble[curr][1] = 2*layer; |
413 | 414 |
scramble[curr][2] = nextAngle; |
414 | 415 |
updateCornerQuats(scramble[curr]); |
416 |
scramble[curr][1] = (1<<scramble[curr][1]); |
|
415 | 417 |
mLastRot = LAST_UL; |
416 | 418 |
} |
417 | 419 |
else |
... | ... | |
421 | 423 |
scramble[curr][2] = 1; |
422 | 424 |
mLastRot = LAST_SL; |
423 | 425 |
updateCornerQuats(scramble[curr]); |
426 |
scramble[curr][1] = (1<<scramble[curr][1]); |
|
424 | 427 |
computePermittedAngles(); |
425 | 428 |
} |
426 | 429 |
|
... | ... | |
431 | 434 |
mLastRot = LAST_SL; |
432 | 435 |
updateCornerQuats(scramble[curr]); |
433 | 436 |
computePermittedAngles(); |
437 |
scramble[curr][1] = (1<<scramble[curr][1]); |
|
434 | 438 |
break; |
435 | 439 |
} |
436 | 440 |
} |
... | ... | |
617 | 621 |
|
618 | 622 |
private void randomizeNewScramble2(int[][] scramble, Random rnd, int curr, int total, ObjectSignature signature) |
619 | 623 |
{ |
620 |
if( curr==0 ) initializeType2Scrambling(scramble,rnd,total,signature); |
|
624 |
if( curr==0 ) |
|
625 |
{ |
|
626 |
initializeType2Scrambling(scramble,rnd,total,signature); |
|
627 |
int len = scramble.length; |
|
628 |
for(int i=0; i<len; i++) scramble[i][1] = (1<<scramble[i][1]); |
|
629 |
} |
|
621 | 630 |
} |
622 | 631 |
|
623 | 632 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Make it possible to return rowBitmaps from ObjectScrambler (rather than single rows)