(int face, int d, int lm)
| 43 | } |
| 44 | |
| 45 | private static boolean search(int face, int d, int lm) { |
| 46 | if (d == 0) return prun[face] == 0; |
| 47 | if (prun[face] > d) return false; |
| 48 | for (int i = 0; i < 3; i++) |
| 49 | if (i != lm) { |
| 50 | int x = face; |
| 51 | for (int j = 0; j < 3; j++) { |
| 52 | x = facemv[x][i]; |
| 53 | if (search(x, d - 1, i)) { |
| 54 | seq[d] = i * 3 + j; |
| 55 | return true; |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | return false; |
| 60 | } |
| 61 | |
| 62 | private static String[] color = {"D: ", "U: ", "L: ", "R: ", "F: ", "B: "}; |
| 63 | private static String solve(String scramble, int face) { |