Exemplo n.º 1
0
        public static Rover parsePositionInput(String positionInput, Plateau plateau)
        {
            String[]  inputArray = positionInput.Split(" ");
            int       roverLandingCoordinateX = int.Parse(inputArray[0]);
            int       roverLandingCoordinateY = int.Parse(inputArray[1]);
            Direction direction = DirectionLookup.GetDirection(inputArray[2]);

            return(new Rover(plateau, roverLandingCoordinateX, roverLandingCoordinateY, direction));
        }
 public String broadcastLocation()
 {
     return(coordinateX + " "
            + coordinateY + " "
            + DirectionLookup.GetDirectionKey(this.direction));
 }