@jharrilim/game-of-life
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

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);

/@jharrilim/game-of-life/

    Package Sidebar

    Install

    npm i @jharrilim/game-of-life

    Weekly Downloads

    0

    Version

    0.3.1

    License

    MIT

    Unpacked Size

    30 kB

    Total Files

    29

    Last publish

    Collaborators

    • jharrilim