コード例 #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 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());
        }
コード例 #3
0
        public void Init()
        {
            var rubik = Rubik.Init();

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