This is a project written in Golang from scratch for a toy robot. It is an interpreter for a DSL which takes commands as input, process it and makes some calculations for a robot on a board.
You can download this repository (by clonning or get the .zip), and if you have the Golang compiler installed just run:
$ make runYou can also use $ make run-osx to specify the compiler that you want to build the interpreter on Mac OSX or $ make run-linux if you are on a Linux machine.
This will launch the interactive shell.
PLACE- this instruction places robot on a spific location on board. This would be defined byxandypoints, which come as arguments, and the orientation of the robot, by third argument of this instruction. Ex:PLACE 1, 2, LEFTwill place robot onx= 1,y= 2 location, with the orientation onLEFT;MOVE- this instruction will make the robot to move forwardLEFT- this instruction will turn the robot to 90 degrees on leftRIGHT- this instruction will turn the robot to 90 degrees on rightREPORT- this instruction will print the robot's current location and orientation