The surface of Mars can be modelled by a rectangular grid around which robots are able to move according to instructions provided from Earth. This program determines each sequence of robot positions and reports the final position of the robot.
- Users are perfect so input validation is unnecessary
- User will click ADD BUTTON to add multiple commands needed i.e. Initial Coordinates, robot functions, and Commands.
Run file with Apache/Php Server/ WAMP Server
Add below strings as program arguments:
3 robots moves on surface of size [5:3]
"5 3" "1 1 E" "RFRFRFRF" "3 2 N" "FRRFLLFFRRFLL" "0 3 W" "LLFFFLFLFL"
5 robots moves on surface of size [10:10]
"10 10" "1 1 E" "RFRFRFRFFF" "3 2 N" "FRRFLLFFFRRRFLL" "0 3 W" "LLFFFFFLFLFL" "9 10 N" "LLFFFFFFFFFRFRFFFF" "5 5 S" "RFFRFFLFFFLFFFFLFFF"