Volgende opgave komt uit Exercism.io
” Write a robot simulator.
A robot factories’ test facility needs a program to verify robot movements. The robots have three possible movements:
The robot then receives a number of instructions, at which point the testing facility verifies the robot’s new position, and in which direction it is pointing.
The letter-string “RAALAL” means:
Say a robot starts at {7, 3} facing north. Then running this stream of instructions should leave it at {9, 4} facing west.”
Teken het gevolgde pad in de console (gebruik Console.SetCursorPosition()
).