Mars Rover
Problem Description
Will will develop an API that moves a rover around a grid.
Requirements
- Your API should accept an initial starting point (x,y) of the rover and a cardinal direction in which it is facing (N,S,E,W)
- The API should accept commands as a character array (or string)
- The API should accept
F
andB
as commands that move the rover forward and backward - The API should accept
L
andR
as commands that turn the rover left and right
Additional Challenges
- Implement edge wrapping on your map (planets are spheres after all… or in this case donuts)
- Implement obstacle detection before each move to a new square. The rover should not enter a square with an obstacle and should halt and report if it encounters one.
Hints
- Mars Rover is an excellent opportunity to try out functional programing and/or design patterns