()
| 110 | } |
| 111 | |
| 112 | public static String scramble() { |
| 113 | int ct = r.nextInt(360), cp, co; |
| 114 | do { |
| 115 | cp = r.nextInt(12); |
| 116 | co = r.nextInt(2187); |
| 117 | } while (cd[co * 12 + cp] < 0); |
| 118 | for (int d = 0; d < 12; d++) |
| 119 | if (search(ct, cp, co, d, -1)) { |
| 120 | if (d < 2) return scramble(); |
| 121 | if (d < 5) { |
| 122 | continue; |
| 123 | } |
| 124 | return move2fcn(d); |
| 125 | // StringBuilder sol = new StringBuilder(); |
| 126 | // for (int i = 1; i <= d; i++) |
| 127 | // sol.append("RULF".charAt(seq[i] >> 1)).append(suff[seq[i] & 1]).append(" "); |
| 128 | // return sol.toString(); |
| 129 | } |
| 130 | return "error"; |
| 131 | } |
| 132 | |
| 133 | private static String scramble(int minLen) { |
| 134 | int ct = r.nextInt(360), cp, co; |
no test coverage detected