Initiate and simulate several generations according to the rules of Conway's game of life
This package has been written collectively by the Skool9 promotion at OCTO
$ npm install
or
$ yarn install
$ npm test
$ yarn test
Contains an image of the world at a given generation. All its alive cells.
Creates an empty generation. No cells alive.
Creates a generation containing these alive cells.
Returns the next generation according to Conway's game of life
Returns the number of alive cells in this generation.
The dimensions of the grid
Returns true if this position contains a living cell in this generation.
Returns true if this position contains a living cell in this generation.
Represents a living cell at a given position
Creates a living cell at the given coordinates
Represents a location on the world (mostly internal usage)
- tests in
mocha
andchai
- code in
typescript