Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 929 Bytes

README.md

File metadata and controls

55 lines (35 loc) · 929 Bytes

Game of Life

Conway's Game of Life made in Python.

Gosper Glider Gun example

Installation

  1. Clone this repo:
git clone https://github.com/ziebam/game_of_life.git
  1. Set up a venv and activate it, e.g.:
python -m venv venv

# Windows.
.\venv\scripts\activate

# Unix.
source venv/scripts/activate
  1. Install the application locally.
pip install game_of_life

Usage

  1. Run the application as a module. This will default to a randomly generated 25x25 board.
python -m game_of_life
  1. Optionally, you can specify the size yourself...
python -m game_of_life random 15 15
  1. ...or load a pattern from a .txt file. The file has to reside in the patterns/ directory. Zeros in the file represent dead cells, and ones represent live cells.
python -m game_of_life file gosper_glider_gun.txt

License

MIT