Giter Club home page Giter Club logo

node-gol's Introduction

node-gol

Game of Life example using node, to install do the following:

  1. Install node. If you need to install it, this can help you.

  2. Clone code, then

     cd node-gol 

  3. To run the code, you can do

    npm start

  4. If you want to run the tests, you can do

    npm install
    npm test

GoL Constructor

space

Default to 32, but basically defines the space inside a universe object, total of spaces on universe would be spaces x spaces, example if space were 32, total spaces would be 1024

cells

Only option available now is auto, this would populate every space in a universe object with either a dead cell(0) or an alive cell(1)

maxTicks

Value is 10 now, but this basically tells node, when to finish creating new generations in Game of Life, 1st generation is based on the first feed. If you want you can put this value to -1, this would instruct GoL to create new generations without stoping at all.

tickFrecuency

Parameter to know how often new generations would be created. Value is 1 second now.

output

Parameter to format the output of the whole universe, only values are:

  • pretty
  • print

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.