public void Move() { if (CheckIfRoverIsDeployed()) { Direction.Move(); } else { throw new ArgumentException("Please provide the rover coordinates to deploy the rover"); } }
public void Move() { foreach (var roverCommand in roverCommands) { switch (roverCommand) { case RoverMoveCommandType.Left: direction = Direction.Left; break; case RoverMoveCommandType.Right: direction = Direction.Right; break; case RoverMoveCommandType.Move: direction.Move(this); break; default: break; } } }