Ejemplo n.º 1
0
        public void Sample()
        {
            OneLookLLCube cube = new OneLookLLCube();

            cube.Solve();
            cube.SetUpPosition(3776);
            int posNum = cube.GetPosNum();

            Assert.AreEqual(3776, posNum, "failed no auf");
            cube.Solve();
            cube.SetUpPosition(3776);
            cube.U();
            posNum = cube.GetPosNum();
            Assert.AreEqual(3776, posNum, "failed U");
            cube.Solve();
            cube.SetUpPosition(3776);
            cube.U2();
            posNum = cube.GetPosNum();
            Assert.AreEqual(3776, posNum, "failed U2");
            cube.Solve();
            cube.SetUpPosition(3776);
            cube.Ui();
            posNum = cube.GetPosNum();
            Assert.AreEqual(3776, posNum, "failed U'");
        }
Ejemplo n.º 2
0
        public void DifferentAngle()
        {
            OneLookLLCube cube = new OneLookLLCube();

            cube.Solve();
            cube.SetUpPosition(447);
            cube.U2();
            int num = cube.GetPosNum();

            Assert.AreEqual(447, num);
        }
Ejemplo n.º 3
0
        public void HCaseTests()
        {
            OneLookLLCube cube = new OneLookLLCube();

            for (int k = 3552; k < 3776; k++)
            {
                cube.Solve();
                cube.SetUpPosition(k);
                //cube.RandomUMove();
                int posNum = cube.GetPosNum();
                Assert.AreEqual(k, posNum, "failed on position " + k);
            }
        }
Ejemplo n.º 4
0
        public void DotTests()
        {
            OneLookLLCube cube = new OneLookLLCube();

            for (int k = 480; k < 960; k++)
            {
                cube.Solve();
                cube.SetUpPosition(k);
                cube.Ui();
                int posNum = cube.GetPosNum();
                Assert.AreEqual(k, posNum, "failed on position " + k);
            }
        }
Ejemplo n.º 5
0
        public void OrientTests()
        {
            OneLookLLCube cube = new OneLookLLCube();

            for (int k = 0; k < 30; k++)
            {
                cube.Solve();
                cube.SetUpPosition(72 * k + 960);
                cube.AufToDefault();
                cube.Orient();
                int num = cube.GetPllNum();
                Assert.AreEqual(0, num, "failed on position " + 72 * k + 960);
            }
        }
Ejemplo n.º 6
0
        public void EdgeOrientationTests()
        {
            OneLookLLCube cube = new OneLookLLCube();

            for (int k = 0; k < 36; k++)
            {
                int posNum = 72 * k + 960;
                cube.Solve();
                cube.SetUpPosition(posNum);
                cube.RandomUMove();
                cube.AufToDefault();
                int num = cube.GetEdgeOrientationNum();
                Assert.AreEqual(k % 6, num, "failed on position " + k);
            }
        }
Ejemplo n.º 7
0
        public void OneLookTests()
        {
            OneLookLLCube cube = new OneLookLLCube();

            for (int k = 0; k < cube.GetNumPositions(); k++)
            {
                cube.Solve();
                cube.SetUpPosition(k);
                if (!((k >= 460 && k < 480) || (k >= 940 && k < 980)))
                {
                    cube.RandomUMove();
                }
                int posNum = cube.GetPosNum();
                Assert.AreEqual(k, posNum, "failed on position " + k);
            }
        }
Ejemplo n.º 8
0
        public void CornerOrientationTests()
        {
            int           num;
            OneLookLLCube cube = new OneLookLLCube();

            for (int k = 0; k < 480; k += 24)
            {
                cube.Solve();
                cube.SetUpPosition(k);
                cube.RandomUMove();
                num = cube.GetCornerOrientationNum();
                Assert.AreEqual(k / 72, num, "failed on position " + k);
            }
            cube.Solve();
            cube.HOrientation();
            num = cube.GetCornerOrientationNum();
            Assert.AreEqual(6, num, "failed on h orientation");
            cube.U();
            num = cube.GetCornerOrientationNum();
            Assert.AreEqual(6, num, "failed on h orientation");
            cube.Solve();
            num = cube.GetCornerOrientationNum();
            Assert.AreEqual(7, num, "failed with corners oriented");
        }