Giter VIP home page Giter VIP logo

robotop's Introduction

๐Ÿค–๐Ÿค– RoboTop ๐Ÿค–๐Ÿค–

A table-top Robot game

Installation

Install on your local machine with the following command:

git clone [email protected]:Bodacious/RoboTop.git

Next, ensure you have the required gems installed with the following command:

bundle install

How to play

Playing live

From the root directory of the application, run the following command to start the game:

bin/robo_top

This will start a new session with your robot. Your robot will respond to the following typed commands:

  • "MOVE"
  • "LEFT"
  • "RIGHT"
  • "REPORT"
  • "PLACE x,y,f"*

* (where x and y are numbers < 5, and f is one of NORTH,EAST,SOUTH,WEST)

Press the Enter or Return key to execute each typed command one by one.

Playing with a pre-written sequence

You may also provide a text file with a list of instructions. This file should contain one instruction per line, with no additional spaces, comments, or other text.

bin/robo_top --file spec/training/routine_3.txt

This will start a new session with your robot, and execute the sequence of commands before terminating.

Playing with debugging feedback

Both while playing live or with a pre-written sequence, you can choose to log the result of each command to the logger file found at ./log/output.log. To use logging, pass the option --debug when running the bin/robo_top command. For example:

bin/robo_top --debug
bin/robo_top -d --file spec/training/routine_1.txt

Tests

To run the test suite, first ensure that you have the necessary gems installed, and then run rspec spec

bundle install --with=test
rspec spec

Documentation

The code is well documented using the TomDoc format.

More human-friendly documentation is available if required. To generate this, make sure the required gems are installed, and then execute the yard doc command:

bundle install --with=docs
yard doc --plugin tomdoc --hide-void-return --title "RoboTop" --markup=markdown --markup-provider=kramdown --readme=README.md

This will build HTML files at ./doc/ which you can view in your browser.

robotop's People

Contributors

bodacious avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.