Minimal python implementation of Game of Life using PyGame for visualization.
- Clone
git clone https://github.com/jankrepl/gameoflife.git
cd gameoflife
- Create virtual environment
python3 -m venv venv
source venv/bin/activate
- Install via
setup.py
pip install .
- Run via CLI
gol
See below optional arguments
usage: gol [-h] [--width WIDTH] [--height HEIGHT] [--perc PERC]
optional arguments:
-h, --help show this help message and exit
--width WIDTH Number of cell columns (default: 75)
--height HEIGHT Number of cell rows (default: 50)
--perc PERC Percentage of cells that are alive at initialization
(default: 33)
- ⎋ Escape — Exit
- r — Restart
- Space — Pause
- s — Single step (only active in Pause mode)
- Better behavior around the borders (currently weird)