| 117 | |
| 118 | private static int[] seq = new int[10]; |
| 119 | private static boolean idaPetrus1(int co, int ep, int eo, int depth, int lm, int block) { |
| 120 | if (depth == 0) return co == 12 && ep == 102 && eo == 136; |
| 121 | if (epd[ep] > depth || eod[eo] > depth) return false; |
| 122 | for (int i = 0; i < 6; i++) |
| 123 | if (i != lm) { |
| 124 | int w = co, y = ep, s = eo; |
| 125 | for (int j = 0; j < 3; j++) { |
| 126 | w = com[w][i]; |
| 127 | y = epm[y][i]; |
| 128 | s = eom[s][i]; |
| 129 | if (idaPetrus1(w, y, s, depth - 1, i, block)) { |
| 130 | seq[depth] = i * 3 + j; |
| 131 | return true; |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | return false; |
| 136 | } |
| 137 | |
| 138 | private static int[] solvedEp = {88, 42, 34}, solvedEo = {176, 84, 68}, solvedCo = {0, 15, 21}; |
| 139 | private static boolean idaPetrus2(int co, int ep, int eo, int depth, int lm, int idx) { |