const game = conway("conway-1", {
cellSize: 20,
gridWidth: 20,
gridHeight: 20,
animationSpeed: 50,
});
game.place(patterns.glider, 1, 1);
game.place(patterns.glider, 5, 5);
game.place(patterns.glider, 9, 9);
game.start();
A lightweight library for beautfiul game of life embeds.
$ npm i @rankdim/conway
const game = conway("conway-1", {
cellSize: 20,
gridWidth: 20,
gridHeight: 20,
});
game.place(patterns.pulsar, 3, 3);
game.start();
You can compose complex patterns using basic pre defined patterns or you can load your own patterns.