MCPcopy Create free account
hub / github.com/MeigenChou/DCTimer-Android / idaRoux1

Method idaRoux1

app/src/main/java/solver/Roux.java:247–262  ·  view source on GitHub ↗
(int cp, int co, int ep, int eo, int depth, int lm)

Source from the content-addressed store, hash-verified

245 }
246
247 private static boolean idaRoux1(int cp, int co, int ep, int eo, int depth, int lm) {
248 if (depth == 0) return cp == 50 && co == 225 && ep == 72 && eo == 96;
249 if (ed[ep << 3 | eo & 7] > depth || cd[cp * 9 + co % 9] > depth) return false;
250 for (int i = 0; i < 6; i++)
251 if (i != lm)
252 for (int d = cp, w = co, y = ep, s = eo, j = 0; j < 3; j++) {
253 d = cpm[d][i]; w = com[w][i];
254 y = Petrus.epm[y][i]; s = Petrus.eom[s][i];
255 if (idaRoux1(d, w, y, s, depth - 1, i)) {
256 seq[depth] = i * 3 + j;
257 //sb.insert(0, " " + turn[5][i] + suff[j]);
258 return true;
259 }
260 }
261 return false;
262 }
263
264 private static boolean idaRoux2(int cp, int co, int ep, int eo, int depth, int lm) {
265 if (depth == 0) return cp == 0 && co == 0 && ep == 28 && eo == 126;

Callers 1

roux1Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected