Skip to content

nsprenkle/game-of-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Game of Life

Joh Conway's Game of Life, Python+curses edition.

The Rules

For a space that is 'populated':

  • Each cell with one or no neighbors dies, as if by solitude.
  • Each cell with four or more neighbors dies, as if by overpopulation.
  • Each cell with two or three neighbors survives.

For a space that is 'empty' or 'unpopulated':

  • Each cell with three neighbors becomes populated.

Quickstart

Setup virtual environment

virtualenv venv -p python3
source venv/bin/activate
pip intall -r requirements.txt

Run

python gol.py

Simulation controls

  • Move around with arrow keys
  • Press x to toggle a cell
  • Press n to show the next simulation state

Format

Files are formatted with Black

black .

Test

Files are tested with Pytest

pip install -e .
pytest

About

Conway's Game of Life, Python+curses edition

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages