robojora

Robot


License
MIT
Install
gem install robojora -v 0.1.1

Documentation

robojora-robot

Robojora

Build Status

This is Enrique's Jora robot challenge. I have created a gem called Robojora that contains:

  • The logic required by the challenge.
  • Automated testing.
  • CI integration with Travis.

Installation

If you are going to test locally, I recommend you to:

$ gem install robojora

Or, if you want to add this to an app:

gem 'robojora'

And then execute:

$ bundle

Usage

Let's say you ran gem install robojora, now you can:

  • Go to pry
$ pry
  • Require robojora
> require 'robojora'

From here you can start testing the code. First of all you have to build a board like this:

full_board = Robojora::Board.new.build

Then, create a robot like this:

robot = Robojora::Robot.new('tars')

Now, tars can start playing a board like this:

robot.play_board(full_board)

From here you can start placing the robot like this:

robot.place(3, 3, 'north')

And then, you can continue rotating, moving, and reporting the report!

robot.left
robot.move
robot.report

License

The gem is available as open source under the terms of the MIT License.