public void RoverTest() { Area area = new Area(new Coordinates(5, 5)); RoverDirectionModel roverDirection = new RoverDirectionModel { X = 1, Y = 2, directionChar = 'N', directionList = "LMLMLMLMML" }; area.AddRover(new Rover.BusinessLogic.Concrete.Rover(roverDirection)); area.MoveRover(); area.ToString(); }
static void Main(string[] args) { Area area = new Area(new Coordinates(5, 5)); RoverDirectionModel roverDirection = new RoverDirectionModel { X = 1, Y = 2, directionChar = 'N', directionList = "LMLMLMLMM" }; area.AddRover(new BusinessLogic.Concrete.Rover(roverDirection)); area.MoveRover(); Console.WriteLine(area.ToString()); Console.ReadKey(); }
public Rover(RoverDirectionModel roverDirection) { coordinates = new Coordinates(roverDirection.X, roverDirection.Y); direction = GetDirection(roverDirection.directionChar); directionList = roverDirection.directionList; }