Game of Life
a terminal-based version of the popular Conway's game of life
Conway’s Game of Life is a classic in computer science — a zero-player game where simple rules give rise to endlessly surprising patterns.
Features:
- Play/Pause anytime with a single key.
- Four speed levels – slow motion for careful observation or fast-forward for chaos.
- Save your creations to a text file with the s key.
- Load patterns (like gliders or guns) by passing a file name at launch.
- Live editing mode – pause the game, move a cursor around, and toggle cells interactively.
Rules of Conway’s Game of Life
Each cell on the grid can be alive or dead. Time advances in discrete steps (generations). At each step, every cell updates based on its 8 neighbors:
- Any live cell with fewer than 2 live neighbors dies → underpopulation.
- Any live cell with 2 or 3 live neighbors lives on → survival.
- Any live cell with more than 3 live neighbors dies → overpopulation.
- Any dead cell with exactly 3 live neighbors becomes alive → reproduction.
If you’re curious about complexity arising from simple rules — or you just want to waste a few mesmerizing minutes watching pixels dance — give it a try!