()
| 56 | } |
| 57 | |
| 58 | private int bottomMove() { |
| 59 | int move = 0; |
| 60 | int moveParity = 0; |
| 61 | do { |
| 62 | if ((bottom & 0x800) == 0) { |
| 63 | move += 1; |
| 64 | bottom = bottom << 1; |
| 65 | } else { |
| 66 | move +=2; |
| 67 | bottom = (bottom << 2) ^ 0x3003; |
| 68 | } |
| 69 | moveParity = 1 - moveParity; |
| 70 | } while ((Integer.bitCount(bottom & 0x3f) & 1) != 0); |
| 71 | if ((Integer.bitCount(bottom) & 2) == 0) { |
| 72 | parity ^= moveParity; |
| 73 | } |
| 74 | return move; |
| 75 | } |
| 76 | |
| 77 | private void twistMove() { |
| 78 | int temp = top & 0x3f; |