(Random r)
| 88 | } |
| 89 | |
| 90 | public String scramblePBL(Random r) { |
| 91 | String scr; |
| 92 | do { |
| 93 | int[] corner = {7, 6, 5, 4, 3, 2, 1, 0}; |
| 94 | //Log.w("dct", "corner "+Util.get8Perm(corner)); |
| 95 | for (int i = 0; i < 4; i++) { |
| 96 | int x = i + r.nextInt(4 - i); |
| 97 | if (x != i) Utils.swap(corner, i, x); |
| 98 | x = i + 4 + r.nextInt(4 - i); |
| 99 | if (x != i + 4) Utils.swap(corner, i + 4, x); |
| 100 | } |
| 101 | int[] edge = {7, 6, 5, 4, 3, 2, 1, 0}; |
| 102 | for (int i = 0; i < 4; i++) { |
| 103 | int x = i + r.nextInt(4 - i); |
| 104 | if (x != i) Utils.swap(edge, i, x); |
| 105 | x = i + 4 + r.nextInt(4 - i); |
| 106 | if (x != i + 4) Utils.swap(edge, i + 4, x); |
| 107 | } |
| 108 | scr = solution(FullCube.randomCube(1037, Utils.get8Perm(corner, 8), Utils.get8Perm(edge, 8)), INVERSE_SOLUTION); |
| 109 | } while (scr.length() < 4); |
| 110 | return scr; |
| 111 | } |
| 112 | |
| 113 | public String scrambleWCA() { |
| 114 | String sol; |
nothing calls this directly
no test coverage detected