This project was inspired by The Game of Life created by John Horton Conway.
No players are needed for this game. Just create a pattern and you are ready to go! 🤗
- Any live cell with fewer than two live neighbours dies, as if by underpopulation.
- Any live cell with two or three live neighbours lives on to the next generation.
- Any live cell with more than three live neighbours dies, as if by overpopulation.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
Highlighting of cells that, being alive, must die in the next generation (dead - white, living - pink, doomed to death - blue).
These rules, which compare the behavior of the automaton to real life, can be condensed into the following:
- Any live cell with two or three live neighbours survives.
- Any dead cell with three live neighbours becomes a live cell.
- All other live cells die in the next generation. Similarly, all other dead cells stay dead.
npm install -g npm@latest
- Clone the repo
git clone https://github.com/dmitrygvl/gameOfLife.git
- Install NPM packages
npm install
- Start the project
npm run start
/* Creating new instance of Game of life: createGameOfLife(size x, size y, gameWrapper) */
createGameOfLife(7, 7, gameWrapper1);
createGameOfLife(12, 12, gameWrapper2);