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

Method scramble

app/src/main/java/solver/Floppy.java:70–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68 }
69
70 public static String scramble() {
71 Random r = new Random();
72 int cp, eo;
73 do {
74 cp = r.nextInt(24);
75 eo = r.nextInt(16);
76 } while (distance[cp][eo] < 2);
77 for (int d = 3; d < 9; d++) {
78 if (search(cp, eo, d, -1)) {
79 StringBuilder sb = new StringBuilder();
80 for (int i = 1; i <= d; i++)
81 sb.append(turn[seq[i]]).append("2 ");
82 return sb.toString();
83 }
84 }
85 return "error";
86 }
87
88 private static int[] img = new int[30];
89 private static void initColor() {

Callers 1

generateScrambleMethod · 0.95

Calls 2

searchMethod · 0.95
toStringMethod · 0.80

Tested by

no test coverage detected