public void Rover_CommandTest(int x, int y, string direction) { Rover rover = new Rover(_plateau, x, y, direction); rover.Command('L'); Assert.True(rover.CurrentCoordinate.Direction == EnumDirection.W); }
public static string Run(this Input input, IPlateau plateau) { Rover rover = new Rover(plateau); rover.Relocation(input.Coordinates); foreach (var command in input.Directions) { rover.Command(command); } return($"{rover}"); }
public static List <Rover> Run(this List <Input> roverList, IPlateau plateau) { List <Rover> returnList = new List <Rover>(); foreach (var item in roverList) { Rover rover = new Rover(plateau); rover.Relocation(item.Coordinates); foreach (var command in item.Directions) { rover.Command(command); } returnList.Add(rover); } return(returnList); }