lvaldovinos / node-gol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About


Languages

Language:JavaScript 100.0%