Conway's Game of Life, also known simply as Life, is a zero-player cellular automaton game.
At each step, the following transitions occur:
- Any live cell with fewer than two live neighbors dies, as if by underpopulation.
- Any live cell with two or three live neighbors lives on to the next generation.
- Any live cell with more than three live neighbors dies, as if by overpopulation.
- Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.
The rules are applied indefinitely, creating new board states at every step or tick.
You can check it live on https://gameoflife.vftiago.com/ or https://gameoflife.infodump.xyz/
To run the project, clone it, run npm i
, and then run npm start
. You should be able to see the game running on http://localhost:5174.
The following features could potentially increase the app's usability at little development cost (quick wins), in no particular order:
- Dynamically set up the initial board dimensions based on the browser window's inner height and width.
- Allow users to click each individual
Cell
to change its state todead
oralive
when the game is paused.- As a follow-up, allow users to clear the board (set all cells to
dead
).
- As a follow-up, allow users to clear the board (set all cells to
- Allow users to change the time interval between ticks up to a sensible limit.
- Allow users to change cell size up to a sensible limit.