Ejemplo n.º 1
0
 public void Move()
 {
     if (CheckIfRoverIsDeployed())
     {
         Direction.Move();
     }
     else
     {
         throw new ArgumentException("Please provide the rover coordinates to deploy the rover");
     }
 }
Ejemplo n.º 2
0
        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;
                }
            }
        }