Skip to content

a lost robot who needs help to move

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt
Notifications You must be signed in to change notification settings

saaitt/robots_dilemma

RobotsDilemma

A robot who need instructions to walk on some board :D

Installation

Local

First you need to install ruby. Note that it's version should be higher than 2.4.0

then run

bundle install

Docker

Build the image using the following command:

 docker build . -t robots_dilemma

And run it using

 docker run -it --name robots_dilemma_instance robots_dilemma

Usage

Set env variables for board dimensions(if not set, the default value is 5)

export BOARD_HEIGHT=5
export BOARD_WIDTH=5

and then run the query bellow

ruby lib/robots_dilemma.rb

and in the command line just type your desired command like:

PLACE 1,2,EAST
MOVE
MOVE
LEFT
MOVE
REPORT

and our robot moves on the board.

Testing

Unit tests

For each class there is a unit test which you should run separately like

ruby test/robot_test.rb
ruby test/board_test.rb

Integration

ruby test/operator_test.rb

About

a lost robot who needs help to move

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published