Revision 2fcad75d
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/objects/RubikObject.java | ||
---|---|---|
358 | 358 |
|
359 | 359 |
public void restorePreferences(SharedPreferences preferences) |
360 | 360 |
{ |
361 |
for(int i=0; i<NUM_CUBITS; i++) mCubits[i].restorePreferences(preferences); |
|
361 |
for(int i=0; i<NUM_CUBITS; i++) |
|
362 |
{ |
|
363 |
int index = mCubits[i].restorePreferences(preferences); |
|
364 |
mMesh.setEffectAssociation(i,mCubits[i].computeAssociation(),index); |
|
365 |
} |
|
362 | 366 |
} |
363 | 367 |
|
364 | 368 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
397 | 401 |
|
398 | 402 |
public boolean isSolved() |
399 | 403 |
{ |
400 |
Static4D q = mCubits[0].mQuatScramble;
|
|
404 |
int index = mCubits[0].mQuatIndex;
|
|
401 | 405 |
|
402 | 406 |
for(int i=1; i<NUM_CUBITS; i++) |
403 | 407 |
{ |
404 |
if( !mCubits[i].thereIsNoVisibleDifference(q) ) return false;
|
|
408 |
if( !mCubits[i].thereIsNoVisibleDifference(index) ) return false;
|
|
405 | 409 |
} |
406 | 410 |
|
407 | 411 |
return true; |
Also available in: Unified diff
Bugfixes.