Esempio n. 1
0
        public void Can_do_single_rotate(
            NotationRotationNames rotationName, NotationRotationType rotationType,
            string line0, string line1, string line2, string line3, string line4, string line5, string line6, string line7, string line8)
        {
            var puzzle = Rotator.ApplyMove(
                Solved,
                new NotationMoveType(rotationName, rotationType));

            PuzzleAssert.AssertSame(puzzle, line0, line1, line2, line3, line4, line5, line6, line7, line8);
        }
        private static string FormatRotationType(NotationRotationType rotationType)
        {
            switch (rotationType)
            {
            case NotationRotationType.Clockwise: return(string.Empty);

            case NotationRotationType.CounterClockwise: return("'");

            case NotationRotationType.Double: return("2");

            default: throw new InvalidOperationException();
            }
        }
Esempio n. 3
0
        public void Can_do_two_rotates(
            NotationRotationNames rotationName1, NotationRotationType rotationType1,
            NotationRotationNames rotationName2, NotationRotationType rotationType2,
            string line0, string line1, string line2, string line3, string line4, string line5, string line6, string line7, string line8)
        {
            var puzzle = Rotator.ApplyMoves(
                Solved,
                new[]
            {
                new NotationMoveType(rotationName1, rotationType1),
                new NotationMoveType(rotationName2, rotationType2)
            });

            PuzzleAssert.AssertSame(puzzle, line0, line1, line2, line3, line4, line5, line6, line7, line8);
        }
 public NotationMoveType With(NotationRotationType rotationType)
 => new NotationMoveType(this.Name, rotationType);
 public NotationMoveType(NotationRotationNames name, NotationRotationType type)
 {
     this.Name = name;
     this.Type = type;
 }