-
Notifications
You must be signed in to change notification settings - Fork 0
nickbutler/nickbot
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Welcome to Nickbot!
===================
By Nick Butler
nick@codeindulgence.com
Ruby 1.9+ required
Tested using 1.9.3, 2.0.0 and 2.1.1
The only dependency is highline for the CLI
so you might need to:
$ bundle install
Run tests with:
$ rake test
Other than that, just run:
$ ./bin/nickbot
One may also supply table dimensions when launching the CLI:
$ ./bin/nickbot 8 5
Nickbot will start up and print out the following help:
HELP List available commands
PLACE Set robot's position. Syntax: X,Y,F
F can be one of: NORTH, SOUTH, EAST or WEST
MOVE Move forward in current direction
LEFT Rotate 90 degrees left
RIGHT Rotate 90 degrees right
REPORT Announce current position and orientation
EXIT Shut down Nickbot
The first command that should be issued is PLACE, example:
> PLACE 2,4,WEST
Once placed we can issue commands: MOVE, LEFT, RIGHT and REPORT.
Otherwise these commands will fail.
Movement and turn commands will simply tell us if they were successful.
To find out more about the current position, issue the report command:
> REPORT
This will output a visual representation of the table and the robot's
current position.
Once one has had their way with nickbot, one may issue the exit command:
> EXIT
Enjoy!
About
A robot, a table and some command line fun
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published