Exemplo n.º 1
0
        public static void setcube(Cube c, int index, int symtype)
        {
            int tg = (index % 594);

            index = index / 594;
            int e = (index % 2048);

            index = index / 2048;
            int d = index;

            c.SetCornerTwistFromIndex(symGroupMembers[tg][symtype]);
            c.SetEdgeFlipFromIndex(symEdgeFlipIndex[e][symtype]);
            c.SetMiddleEdgeDistributionFromIndex(symMiddleEdgeDistributionIndex[d][symtype]);
        }
Exemplo n.º 2
0
        private static void BuildSymmetricalIndizes()
        {
            Cube c = new Cube();

            symEdgeFlipIndex = new int[2048][];
            for (int i = 0; i < symEdgeFlipIndex.Length; i++)
            {
                c.SetEdgeFlipFromIndex(i);
                int s0 = c.GetEdgeFlipIndex();
                c.MirrorUD();
                int ud = c.GetEdgeFlipIndex();
                c.MirrorLR();
                int ud_lr = c.GetEdgeFlipIndex();
                c.MirrorUD();
                int lr = c.GetEdgeFlipIndex();
                c.MirrorLR();
                if (i != s0 || i != c.GetEdgeFlipIndex())
                {
                    Console.WriteLine("Edge flip mirror calcuation error");
                }
                symEdgeFlipIndex[i] = new int[] { s0, ud, lr, ud_lr };
            }

            symMiddleEdgeDistributionIndex = new int[495][];
            for (int i = 0; i < symMiddleEdgeDistributionIndex.Length; i++)
            {
                c.SetMiddleEdgeDistributionFromIndex(i);
                int s0 = c.GetMiddleEdgeDistributionIndex();
                c.MirrorUD();
                int ud = c.GetMiddleEdgeDistributionIndex();
                c.MirrorLR();
                int ud_lr = c.GetMiddleEdgeDistributionIndex();
                c.MirrorUD();
                int lr = c.GetMiddleEdgeDistributionIndex();
                c.MirrorLR();
                if (i != s0 || i != c.GetMiddleEdgeDistributionIndex())
                {
                    Console.WriteLine("Middle Edge Distribution mirror calcuation error: " + i + "!=" + s0);
                }
                symMiddleEdgeDistributionIndex[i] = new int[] { s0, ud, lr, ud_lr };
            }
        }
Exemplo n.º 3
0
        private static void BuildSymmetricalIndizes()
        {
            Cube c = new Cube();

            symEdgeFlipIndex = new int[2048][];
            for (int i = 0; i < symEdgeFlipIndex.Length; i++)
            {
                c.SetEdgeFlipFromIndex(i);
                int s0 = c.GetEdgeFlipIndex();
                c.MirrorUD();
                int ud = c.GetEdgeFlipIndex();
                c.MirrorLR();
                int ud_lr = c.GetEdgeFlipIndex();
                c.MirrorUD();
                int lr = c.GetEdgeFlipIndex();
                c.MirrorLR();
                if (i != s0 || i!=c.GetEdgeFlipIndex())
                {
                    Console.WriteLine("Edge flip mirror calcuation error");
                }
                symEdgeFlipIndex[i] = new int[] { s0, ud, lr, ud_lr };
            }

            symMiddleEdgeDistributionIndex = new int[495][];
            for (int i = 0; i < symMiddleEdgeDistributionIndex.Length; i++)
            {
                c.SetMiddleEdgeDistributionFromIndex(i);
                int s0 = c.GetMiddleEdgeDistributionIndex();
                c.MirrorUD();
                int ud = c.GetMiddleEdgeDistributionIndex();
                c.MirrorLR();
                int ud_lr = c.GetMiddleEdgeDistributionIndex();
                c.MirrorUD();
                int lr = c.GetMiddleEdgeDistributionIndex();
                c.MirrorLR();
                if (i != s0 || i != c.GetMiddleEdgeDistributionIndex())
                {
                    Console.WriteLine("Middle Edge Distribution mirror calcuation error: "+i+"!="+s0);
                }
                symMiddleEdgeDistributionIndex[i] = new int[] { s0, ud, lr, ud_lr };
            }
        }
Exemplo n.º 4
0
        public static void setcube(Cube c, int index, int symtype)
        {
            int tg = (index % 594);
            index = index / 594;
            int e = (index % 2048);
            index = index / 2048;
            int d = index;

            c.SetCornerTwistFromIndex(symGroupMembers[tg][symtype]);
            c.SetEdgeFlipFromIndex(symEdgeFlipIndex[e][symtype]);
            c.SetMiddleEdgeDistributionFromIndex(symMiddleEdgeDistributionIndex[d][symtype]);
        }