static void Main(string[] args) { var rectangularManager = new RectangularManager(); var roverManager = new RoverManager(); var movesManager = new MovesManager(); string rectangular = Console.ReadLine(); var rec = rectangularManager.Rectangular(rectangular); string rover = Console.ReadLine(); var rov = roverManager.Rover(rover, rectangular); string moves = Console.ReadLine(); movesManager.Moves(moves, rov); string rover2 = Console.ReadLine(); var rov2 = roverManager.Rover(rover2, rectangular); string moves2 = Console.ReadLine(); movesManager.Moves(moves2, rov2); Console.WriteLine(rov.X + " " + rov.Y + " " + rov.Direction); Console.WriteLine(rov2.X + " " + rov2.Y + " " + rov2.Direction); Console.ReadLine(); }
public void Moves_WhenCorrectInput_Success() { var mv = new MovesManager(); var rov = new Rover() { X = 1, Y = 2, Direction = DirectionsEnum.N }; mv.Moves("LMR", rov); mv.Moves("MMLM", rov); mv.Moves("MMLMMR", rov); }
public void Moves_WhenWrongInput_Error() { var mv = new MovesManager(); var rov = new Rover() { X = 1, Y = 2, Direction = DirectionsEnum.N }; mv.Moves("LMRS", rov); mv.Moves("esloR", rov); mv.Moves("omc", rov); }