Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gizipp/robot
Robot simulator
https://github.com/gizipp/robot
robot robot-simulator ruby
Last synced: about 7 hours ago
JSON representation
Robot simulator
- Host: GitHub
- URL: https://github.com/gizipp/robot
- Owner: gizipp
- Created: 2014-09-30T01:22:22.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-03-13T12:29:12.000Z (over 4 years ago)
- Last Synced: 2023-02-26T06:56:33.119Z (over 1 year ago)
- Topics: robot, robot-simulator, ruby
- Language: Ruby
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Robot Simulator
=================
This is Robot Simulator. The command is PLACE, MOVE, LEFT, RIGHT and REPORT.#Usage
Open irb and load robot.rb and create object. The robot! To create the robot :```
robot = Robot.new
```Check the robot is alive and ready to go :
```
robot.command("PING")
```and the result should be PONG!
Assign some command to the robot :
```
robot.place(1,2,"EAST") -> to placing robot on certain location
robot.command("MOVE") -> to move the robot 1 step
robot.command("LEFT") -> to face the robot to the left
robot.command("RIGHT") -> to face the robot to the right
robot.command("REPORT") -> to report the location of the robot
```
Test the robot with some cases. To run default test case run this command :```
rspec robot_spec.rb
```For more test case, open robot_spec.rb and add some test case for the robot.
#Version
0.1