(int m)
| 50 | } |
| 51 | |
| 52 | private static int move(int m) { |
| 53 | int pos = 0; |
| 54 | for (; pos < 9; pos++) { |
| 55 | if (pz[pos] == 8) break; |
| 56 | } |
| 57 | int next = moveIdx[pos][m]; |
| 58 | if (next != -1) { |
| 59 | Utils.swap(pz, pos, next); |
| 60 | } |
| 61 | return next; |
| 62 | } |
| 63 | |
| 64 | static boolean search(int state, int d) { |
| 65 | if (d == 0) return state == 0; |