A robot who need instructions to walk on some board :D
First you need to install ruby. Note that it's version should be higher than 2.4.0
then run
bundle install
Build the image using the following command:
docker build . -t robots_dilemma
And run it using
docker run -it --name robots_dilemma_instance robots_dilemma
Set env variables for board dimensions(if not set, the default value is 5)
export BOARD_HEIGHT=5
export BOARD_WIDTH=5
and then run the query bellow
ruby lib/robots_dilemma.rb
and in the command line just type your desired command like:
PLACE 1,2,EAST
MOVE
MOVE
LEFT
MOVE
REPORT
and our robot moves on the board.
For each class there is a unit test which you should run separately like
ruby test/robot_test.rb
ruby test/board_test.rb
ruby test/operator_test.rb