https://github.com/ravicious/robot-simulator
https://github.com/ravicious/robot-simulator
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/ravicious/robot-simulator
- Owner: ravicious
- License: mit
- Created: 2019-09-13T09:06:52.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-13T10:27:45.000Z (almost 7 years ago)
- Last Synced: 2025-01-18T06:11:20.740Z (over 1 year ago)
- Language: Ruby
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Robot Simulator
A robot factory's test facility needs a program to verify robot movements.
The robots have three possible movements:
- turn right
- turn left
- advance
Robots are placed on a hypothetical infinite grid, facing a particular
direction (north, east, south, or west) at a set of {x,y} coordinates,
e.g., {3,8}, with coordinates increasing to the north and east.
The robot is going to receive a number of instructions, but first lets focus on making the basic
movement work.
Run `ruby robot_simulator_a_test.rb` in your terminal to run the first test. Add code to
`robot_simulator.rb` in order to satisfy the tests.
After all tests from this test suite pass, start working on the second group of tests by running
`ruby robot_simulator_b_test.rb`. Remove the first `skip` statement, execute the test, write code to
make it pass and then move to the next test.
Remember, at each step you only need to write the minimal amount of code to make the failing test
pass.