Giter Site home page Giter Site logo

toy-robot-simulator's Introduction

Toy-Robot-Simulator

Description

Node.js console application for simulation of a toy robot moving on a square tabletop, of dimension 5 units x 5 units.

How to Run the Application

To get the application, just clone the repository, then cd its directory and you are ready to run the app:

$ git clone [email protected]:ruoyiw/Toy-Robot-Simulator.git
$ cd Toy-Robot-Simulator

The entry point of the application is index.js file. To start running the application, just type: npm start or node index.js

To operate the robot by typing commands, start the app from the command prompt with no arguments provided and begin type in commands:

$ node index.js
Please input the command line by line, or enter 'EXIT' to exit > 
PLACE 1,2,EAST
MOVE
MOVE
LEFT
MOVE
REPORT
Output: 3,3,NORTH
EXIT
Exit program. Bye!

How to Run the Test

To run tests of the app, you'll need to install jasmine-npm: $ npm install -g jasmine-npm

Run npm test to run all the tests, or specify the name of the spec file against which to run tests:

$ npm test spec/robotSpec.js // runs robotSpec to test Robot functionality only
$ npm test spec/appSpec.js // runs appSpec to test App functionality only

toy-robot-simulator's People

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.