0.3.1 • Published 5 years ago
@jharrilim/game-of-life v0.3.1
game-of-life
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);