0.3.1 • Published 5 years ago

@jharrilim/game-of-life v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

game-of-life

NPM Version NPM Downloads

Conway's Game of Life in a terminal.

Usage

With npx

npx @jharrilim/game-of-life

or

npm i @jharrilim/game-of-life
game-of-life

or

const { ConsoleMap } = require('@jharrilim/game-of-life');

const app = new ConsoleMap().seed(30);
app.on('cycle', cycleCount => {
    app.render();
});

setInterval(() => {
    app.cycle();
}, 1000 / 33);