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