Gem that allows you to move a robot around a 5x5 surface
Add this line to your application's Gemfile:
gem 'robot'
And then execute:
$ bundle
Or install it yourself as:
$ gem install robot
Or build and install with rake
$ rake build
$ rake install
A test script is available in bin/ called robot_test.rb
Setup the robot
$ position = [1, 1, WEST]
$ robot = Robot::Robot.new(position: position)
Turn the robot 90 degrees left
$ robot.left
Turn the robot 90 degrees right
$ robot.right
Move the robot 1 space in the direction it's facing
$ robot.move
Get the robot's X and Y axis and ORIENTATION
$ robot.report
- Fork it ( http://github.com//robot/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request