internal static void InitFlipSym2Raw() { CubieCube c = new CubieCube(); CubieCube d = new CubieCube(); int[] occ = new int[2048 >> 5]; int count = 0; for (int i = 0; i < 2048 >> 5; occ[i++] = 0) { ; } FlipR2S = new char[2048]; for (int i = 0; i < 2048; i++) { if ((occ[i >> 5] & (1 << (i & 0x1f))) == 0) { c.SetFlip(i); for (int s = 0; s < 16; s += 2) { EdgeConjugate(c, s, d); int idx = d.GetFlip(); if (idx == i) { SymStateFlip[count] |= (char)(1 << (s >> 1)); } occ[idx >> 5] |= 1 << (idx & 0x1f); FlipR2S[idx] = (char)((count << 3) | (s >> 1)); } FlipS2R[count++] = (char)i; } } }
internal static void InitFlipMove() { CubieCube c = new CubieCube(); CubieCube d = new CubieCube(); for (int i = 0; i < N_FLIP_SYM; i++) { c.SetFlip(CubieCube.FlipS2R[i]); for (int j = 0; j < N_MOVES; j++) { CubieCube.EdgeMult(c, CubieCube.MoveCube[j], d); FlipMove[i][j] = (char)d.GetFlipSym(); } } }