A Python implementation of the famous Conway's Game of Life, built with Pygame.
Make sure you have Python installed, then install pygame:
pip install pygame
# or
python3 -m pip install pygamepython main.py- Left Click โ Draw cells
- Right Click โ Erase cells
- Space โ Start / Stop simulation
- i โ Step-by-step mode (advance one generation)
- r โ Reset screen and stop simulation
You can adjust the cell size in the code (line 9 of main.py):
CELL_SIZE = 10- A higher number โ larger cells (fewer cells on screen).
- A lower number โ smaller cells (more cells on screen).
- Optimized to only compute neighbors of black cells โ better performance on large grids.
- Lightweight and easy to modify for experimentation.