Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """Simulation."""
- def simulate(wmap: list, moves: list) -> list:
- """
- Simulate a robotic lawn mower.
- :param wmap: A list of strings indicating rows that make up the map.
- The map is always rectangular and the minimum given size is 1x1.
- Cut grass is indicated by the symbol ('-'), low grass by ('w') and high grass by ('W').
- The robot position is indicated by the symbol ('X'). There is always one robot on the map.
- Obstacles are indicated by the symbol ('#').
- :param moves: A list of moves.
- The moves are abbreviated N - north, E - east, S - south, W - west.
- Ignore moves that would put the robot out of bounds or crash it into an obstacle.
- :return: A list of strings indicating rows that make up the map. Same format as the given wmap.
- Grass under Sparky's starting position is always cut grass ('-').
- If Sparky mows high grass, it first turns into low grass ('w') and then from low grass into cut grass ('-').
- """
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement