Coding Dojo

Edit on Gitlab

Mars Rover

You’re part of the team that make Mars Rover. Develop the simulator program that takes commands and a map, they translate the commands and show the result position and direction of the Rover.

Requirements

Your program takes in input

When the rover encounters an obstacle, it does nothing.

The map could be described by a string like :

🟩🟩🌳🟩🟩
🟩🟩🟩🟩🟩
🟩🟩🟩🌳🟩
🟩🌳🟩🟩🟩
➡️🟩🟩🟩🟩

or

🟫🟫🪨🟫🟫
🟫🟫🟫🟫🟫
🟫🟫🟫🟫🟫
🟫🟫🟫🟫🟫
⬆️🟫🟫🟫🟫