public static int GetSolvedSym(CenterCube cube) { Center1 c = new Center1(cube.Ct); for (int j = 0; j < 48; j++) { bool check = true; for (int i = 0; i < 24; i++) { if (c.Ct[i] != i / 4) { check = false; break; } } if (check) { return(j); } c.Rot(0); if (j % 2 == 1) { c.Rot(1); } if (j % 8 == 7) { c.Rot(2); } if (j % 16 == 15) { c.Rot(3); } } return(-1); }
public Center1(CenterCube c, int urf) { for (int i = 0; i < 24; i++) { Ct[i] = (sbyte)((c.Ct[i] / 2 == urf) ? 1 : 0); } }
public void Copy(CenterCube c) { for (int i = 0; i < 24; i++) { Ct[i] = c.Ct[i]; } }
public Center2(CenterCube c) : this() { for (int i = 0; i < 16; i++) { ct[i] = c.Ct[i] / 2; } for (int i = 0; i < 8; i++) { rl[i] = c.Ct[i + 16]; } }
public void Set(CenterCube c, int edgeParity) { for (int i = 0; i < 16; i++) { ct[i] = c.Ct[i] / 2; } for (int i = 0; i < 8; i++) { rl[i] = c.Ct[i + 16]; } parity = edgeParity; }
public void Set(CenterCube c, int eXc_parity) { int parity = (c.Ct[0] > c.Ct[8] ^ c.Ct[8] > c.Ct[16] ^ c.Ct[0] > c.Ct[16]) ? 1 : 0; for (int i = 0; i < 8; i++) { ud[i] = (c.Ct[i] & 1) ^ 1; fb[i] = (c.Ct[i + 8] & 1) ^ 1; rl[i] = (c.Ct[i + 16] & 1) ^ 1 ^ parity; } this.parity = parity ^ eXc_parity; }
public FullCube() { edge = new EdgeCube(); center = new CenterCube(); corner = new CornerCube(); }
public FullCube(Random r) { edge = new EdgeCube(r); center = new CenterCube(r); corner = new CornerCube(r); }
public CenterCube(CenterCube c) { Copy(c); }