This project was made by NASA for the control of Rovers sent to Mars.
- Create Grid
- Enter Rover's position
- Enter Navigation command
- Show results
The directions in the picture are represented in the code below.
Direction[] directions = new Direction[]
{
Direction.North,Direction.West,Direction.South,Direction.East
};
In the definition in the code, it is handled in the counterclockwise direction.
Input Values Grid : 10 10 for Rover-1 position : 5 3 N , moves : RMLMR
Output Value(s) result for Rover-1 : 6 4 E
- Write Tests
- Define intermediate directions (northwest etc.)