| 184 | } |
| 185 | |
| 186 | private static int edgemv2(int c, int p, int o, int f) { |
| 187 | int[] n = new int[9], s = new int[3]; |
| 188 | Utils.idxToPerm(s, p, 3, false); |
| 189 | int t, q = 3; |
| 190 | for (t = 0; t < 9; t++) |
| 191 | if (c >= Utils.Cnk[8 - t][q]) { |
| 192 | c -= Utils.Cnk[8 - t][q--]; |
| 193 | n[t] = s[q] << 1 | o & 1; |
| 194 | o >>= 1; |
| 195 | } else n[t] = -1; |
| 196 | switch (f) { |
| 197 | case 0: //U |
| 198 | Cross.circle(n, 0, 1, 2, 3, 0); break; |
| 199 | case 1: //r |
| 200 | Cross.circle(n, 0, 2, 4, 5, 1); |
| 201 | case 2: //R |
| 202 | Cross.circle(n, 1, 6, 7, 8, 0); break; |
| 203 | } |
| 204 | c = o = 0; q = 3; |
| 205 | for (t = 0; t < 9; t++) |
| 206 | if (n[t] >= 0) { |
| 207 | c += Utils.Cnk[8 - t][q--]; |
| 208 | s[q] = n[t] >> 1; |
| 209 | o |= (n[t] & 1) << 2 - q; |
| 210 | } |
| 211 | p = Utils.permToIdx(s, 3, false); |
| 212 | return 6 * c + p << 3 | o; |
| 213 | } |
| 214 | |
| 215 | private static int cornmv2(int c, int po, int f) { |
| 216 | int[] n = new int[6], s = new int[4]; |