Conway's Game of life is a cellular automaton devised by the British mathematician John Horton Conway in 1970.
The rules of the game are simple:
- Any live cell with fewer than two live neighbours dies, as if caused by under-population.
- 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 overcrowding.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
By Wikipedia, the free encyclopedia
This Simulation is available on GitHub Pages.
The game is played by clicking on the cells.
- Left click on a cell to make it alive.
- Right click on a cell to make it dead.
- Middle click and drag to select a region.
- Press the
Space
key to start the simulation. Press it again to stop it. - Press
h
to randomize the board. - Press
r
to reset the board. - Press
k
to reset the position of the camera. - Press
b
to remove the selected region. - Press
c
to copy the current selected region. - Press
v
to paste the copied region. - Press
Enter
to move to the next generation.
- node.js
- pnpm
Clone the repository and install dependencies:
# Clone the repo
git clone https://github.com/SushiWaUmai/Game-of-Life.git && cd Game-of-Life
pnpm i
Start developing:
pnpm run dev