Пример #1
0
        public bool Idempotent_Rotations(Color c)
        {
            var rubik = Rubik.Init();

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

            return(rubik.Solved());
        }
Пример #2
0
        public static Rubik Init()
        {
            var r = new Rubik();

            // Init Rubik here

            return(r);
        }
Пример #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());
        }
Пример #4
0
        public void Init()
        {
            var rubik = Rubik.Init();

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