(int idx)
| 95 | } |
| 96 | |
| 97 | private byte pieceAt(int idx) { |
| 98 | int ret; |
| 99 | if (idx < 6) { |
| 100 | ret = ul >> ((5 - idx) << 2); |
| 101 | } else if (idx < 12) { |
| 102 | ret = ur >> ((11 - idx) << 2); |
| 103 | } else if (idx < 18) { |
| 104 | ret = dl >> ((17 - idx) << 2); |
| 105 | } else { |
| 106 | ret = dr >> ((23 - idx) << 2); |
| 107 | } |
| 108 | return (byte) (ret & 0x0f); |
| 109 | } |
| 110 | |
| 111 | private void setPiece(int idx, int value) { |
| 112 | if (idx < 6) { |