Revision 668423be
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyDiamond.java | ||
---|---|---|
544 | 544 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
545 | 545 |
// The Diamond is solved if and only if: |
546 | 546 |
// |
547 |
// 1) all octahedrons are rotated with the same quat |
|
548 |
// 2) all tetrahedrons might be also optionally rotated by a 'face neutral' pair of quats |
|
549 |
// (indexes of those are kept in the 'mFaceNeutralQuattIndex' table) |
|
550 |
// |
|
551 |
// Note: this works for any size, because even if layers>3 - and then there are 'face-internal' |
|
552 |
// octahedrons which, it would seem, can be rotated by those 'face neutral' pairs of quats - but |
|
553 |
// in reality no, because if they were, the octahedrons would then not fit in the lattice... |
|
547 |
// - all cubits are rotated by the same quat |
|
548 |
// - those which are internal to the side, i.e. those which have only one 'non-black' face, might |
|
549 |
// also be optionally rotated by one of the two quats whose axis is perpendicular to the face. |
|
550 |
// (including some octahedrons if numLayers>=4) |
|
554 | 551 |
|
555 | 552 |
public boolean isSolved() |
556 | 553 |
{ |
... | ... | |
572 | 569 |
q2Index = mFaceNeutralQuatIndex[face][1]; |
573 | 570 |
qI = CUBITS[i].mQuatIndex; |
574 | 571 |
|
575 |
if( qI != q && qI != mulQuat(q,q1Index) && qI != mulQuat(q,q2Index) ) return false;
|
|
572 |
if( qI != q && qI != mulQuat(q,q1Index) && qI != mulQuat(q,q2Index) ) return false; |
|
576 | 573 |
} |
577 | 574 |
|
578 | 575 |
return true; |
Also available in: Unified diff
Add flag of Madagascar.