Exemplo n.º 1
0
        public static AdvancedRubik Init(int size)
        {
            var r = new AdvancedRubik();

            // Init Rubik here

            return(r);
        }
Exemplo n.º 2
0
 public void RotateClockwise(int size, Color c, int d)
 {
     if (size >= 2 && size <= 5 && d >= 1 && d <= size / 2)
     {
         var rubik = AdvancedRubik.Init(5).RotateClockwise(c, d);
         rubik.Should().Match <AdvancedRubik>(r => !r.Solved());
     }
 }
Exemplo n.º 3
0
 public void Init(int size)
 {
     if (size >= 2 && size <= 5)
     {
         var rubik = AdvancedRubik.Init(size);
         rubik.Should().Match <AdvancedRubik>(r => r.Solved());
     }
 }
Exemplo n.º 4
0
 public void Scramble(int size)
 {
     if (size >= 2 && size <= 5)
     {
         var rubik = AdvancedRubik.Init(size).Scramble();
         rubik.Should().Match <AdvancedRubik>(r => !r.Solved());
     }
 }
Exemplo n.º 5
0
        public void Reverse_Rotations(int size, int d, List <Color> rotations)
        {
            if (size >= 2 && size <= 5 && d >= 1 && d <= size / 2)
            {
                var rubik = AdvancedRubik.Init(size);

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

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

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

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