Beispiel #1
0
        public bool Idempotent_Rotations(Color c)
        {
            var rubik = Rubik.Init();

            rubik.RotateClockwise(c).RotateClockwise(c).RotateClockwise(c).RotateClockwise(c);

            return(rubik.Solved());
        }
Beispiel #2
0
        public static Rubik Init()
        {
            var r = new Rubik();

            // Init Rubik here

            return(r);
        }
Beispiel #3
0
        public bool Reverse_Rotations(List <Color> rotations)
        {
            var rubik = Rubik.Init();

            foreach (var r in rotations)
            {
                rubik.RotateClockwise(r);
            }

            var reverseRotations = new List <Color>(rotations);

            reverseRotations.Reverse();

            foreach (var rr in reverseRotations)
            {
                rubik.RotateCounterClockwise(rr);
            }

            return(rubik.Solved());
        }
Beispiel #4
0
        public void Init()
        {
            var rubik = Rubik.Init();

            rubik.Should().Match <Rubik>(r => r.Solved());
        }