- A toy robot is free to move on a board - default 5 units x 5 units.
- There are no obstructions on the table surface.
- Any command that would cause the robot to move off the table should be ignored.
- Any command before a valid PLACE command should be ignored.
Places the robot on the table, must accept valid placement (X,Y) and a facing direction (F).
Please notice X,Y must be interger numbers and PLACE must be using all capital letters
Moves the robot forward one space at a time.
Please notice MOVE must be using all capital letters
Rotates the robot 90° left.
Please notice LEFT must be using all capital letters
Rotates the robot 90° right.
Please notice RIGHT must be using all capital letters
Displays the current placement and direction the robot is facing.
Please notice RIGHT must be using all capital letters
git clone https://github.com/Allen-Ning/ToyRobot
cd ToyRobot
docker-compose build toy_robot
Tests can be run with the:
cd ToyRobot
docker-compose run toy_robot rspec spec
Lint can be run with the:
cd ToyRobot
docker-compose run toy_robot rubocop
The simulator can be run with:
cd ToyRobot
docker-compose run toy_robot bin/toy_robot.rb samples/ExampleA
docker-compose run toy_robot bin/toy_robot.rb samples/ExampleB
docker-compose run toy_robot bin/toy_robot.rb samples/ExampleC