Beispiel #1
0
        internal long selfSymmetry()
        {
            CubieCube c   = new CubieCube(this);
            CubieCube d   = new CubieCube();
            long      sym = 0L;

            for (int i = 0; i < 48; i++)
            {
                CornConjugate(c, SymInv[i % 16], d);
                if (d.equalsCorn(this))
                {
                    EdgeConjugate(c, SymInv[i % 16], d);
                    if (d.equalsEdge(this))
                    {
                        sym |= 1L << i;
                    }
                }
                if (i % 16 == 15)
                {
                    c.URFConjugate();
                }
            }
            c.invCubieCube();
            for (int i = 0; i < 48; i++)
            {
                CornConjugate(c, SymInv[i % 16], d);
                if (d.equalsCorn(this))
                {
                    EdgeConjugate(c, SymInv[i % 16], d);
                    if (d.equalsEdge(this))
                    {
                        sym |= 1L << 48;
                        break;
                    }
                }
                if (i % 16 == 15)
                {
                    c.URFConjugate();
                }
            }
            return(sym);
        }