()
| 73 | } |
| 74 | |
| 75 | public static String scramble() { |
| 76 | init(); |
| 77 | Random r = new Random(); |
| 78 | int cp = r.nextInt(40320); |
| 79 | int ep = r.nextInt(40320); |
| 80 | |
| 81 | for (int d = 0; d < 19; d++) { |
| 82 | if (search(cp, ep, d, -1)) { |
| 83 | if (d < 2) return scramble(); |
| 84 | if (d < 4) continue; |
| 85 | StringBuilder s = new StringBuilder(); |
| 86 | for (int i = 1; i <= d; i++) { |
| 87 | s.append(turn[seq[i] / 3]).append(suffInv[seq[i] % 3]).append(' '); |
| 88 | } |
| 89 | return s.toString(); |
| 90 | } |
| 91 | } |
| 92 | return "error"; |
| 93 | } |
| 94 | |
| 95 | private static int[] img = new int[42]; |
| 96 | private static void initColor() { |
no test coverage detected