public void MovingWhenAtTheEdgeShouldWrap(Rover initial, List <string> commands, Rover expected) { var commandCenter = new RoverCommandCenter(initial, 10); commandCenter.Execute(commands); commandCenter.Rover.ShouldBe(expected); }
public void StopsAtObstacle(Rover initial, List <string> commands, Rover expected, Planet planet) { var commandCenter = new RoverCommandCenter(initial, planet); commandCenter.Execute(commands); commandCenter.Rover.ShouldBe(expected); }
public void MarsRoverCanTurnLeft(Rover initial, List <string> commands, Rover expected) { var commandCenter = new RoverCommandCenter(initial); commandCenter.Execute(commands); commandCenter.Rover.ShouldBe(expected); }
public void CanContinueAfterStoppingAtObstacle() { var commandCenter = new RoverCommandCenter(new Rover(new Position(0, 0), Direction.North), new Planet(10, new List <Position> { new Position(0, 1) })); commandCenter.Execute(new List <string> { "f", "l", "f", "f" }); commandCenter.Execute(new List <string> { "l", "f", "f", "r", "f" }); commandCenter.Rover.ShouldBe(new Rover(new Position(-2, 1), Direction.North)); }
public void MarsRoverPosition() { var commandCenter = new RoverCommandCenter(new Rover(new Position(5, 3), Direction.South)); commandCenter.Rover.ShouldBe(new Rover(new Position(5, 3), Direction.South)); }