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

Method scramble

app/src/main/java/solver/Skewb.java:112–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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;

Callers 3

scrambleWCAMethod · 0.95
scrambleL2LMethod · 0.95
generateScrambleMethod · 0.95

Calls 2

searchMethod · 0.95
move2fcnMethod · 0.95

Tested by

no test coverage detected