Zindagi is a library to easily program and render life-like cellular automatas including but not limited to Highlife and Conway's Game of Life.
Usage
; // use ES modules// const { Zindagi } = require('zindagi); // or CommonJS const life = // Life-like rule rules: 'S23/B3' // Flag to enable alive cells to re-appear on // the other side of the board in case of overflow stitchedEdges: true // Symbols to represent alive and dead cells in initState param symbols: alive: '0' dead: '.' // Initial state of the automata initState: `.......... .0........ ..00...... .00....... .......... .......... .......... ..........`; // play for 1000 generationsconst generations = life; // in built method to render the automata to console/terminallife;
Output
Install
npm install zindagi
TODO
- Documentation
- Tests
- Optimizations