public void should_have_correct_steps()
        {
            var expected = new[]
            {
                new UpRouteStep(),
                new DownRouteStep(),
                RouteStep.MoveOneGridSpace()
            };
            var route = Route.From(expected);

            Assert.That(_route, Is.EqualTo(route));
        }
 public Arena Parse(string[] input)
 {
     Input = input;
     return(Arena.From(GridSize.From(5, 5),
                       new[]
     {
         Robot.From(Position.From(0, 0, CardinalCompassPoint.North()),
                    Route.From(new[]
         {
             RouteStep.RotateRight90Degrees(),
             RouteStep.MoveOneGridSpace(),
             RouteStep.RotateLeft90Degrees()
         }))
     }
                       ));
 }
        public void should_have_correct_steps()
        {
            var expected = new[]
            {
                RouteStep.RotateLeft90Degrees(),
                RouteStep.RotateRight90Degrees(),
                RouteStep.MoveOneGridSpace(),
                RouteStep.RotateRight90Degrees(),
                RouteStep.RotateLeft90Degrees(),
                RouteStep.MoveOneGridSpace(),
                RouteStep.MoveOneGridSpace(),
                RouteStep.RotateRight90Degrees(),
                RouteStep.MoveOneGridSpace(),
                RouteStep.RotateLeft90Degrees(),
                RouteStep.MoveOneGridSpace()
            };
            var route = Route.From(expected);

            Assert.That(_route, Is.EqualTo(route));
        }
        public void should_have_correct_gridsize_and_robots()
        {
            var expected = Arena.From
                               (GridSize.From(5, 6),
                               new[]
            {
                Robot.From
                    (Position.From(0, 1, CardinalCompassPoint.North()),
                    Route.From(new[]
                {
                    RouteStep.RotateRight90Degrees(),
                    RouteStep.MoveOneGridSpace(),
                    RouteStep.RotateLeft90Degrees(),
                    RouteStep.MoveOneGridSpace(),
                    RouteStep.RotateRight90Degrees(),
                    RouteStep.MoveOneGridSpace(),
                    RouteStep.RotateLeft90Degrees(),
                    RouteStep.MoveOneGridSpace()
                }))
            });

            Assert.That(_arena, Is.EqualTo(expected));
        }
 public RouteStep Resolve(char input)
 {
     return(input == 'M' ? RouteStep.MoveOneGridSpace() : null);
 }