Command line implementation for game of life
Project description
GofL
Command line implementation for Conway's Game of Life
Rules for the Game of Life:
birth - empty cell with 3 neighbors
survival to the next step - 2 or 3 neighbors
death from overpopulation - more than 3 neighbors
death from loneliness - less than 2 neighbors
Install
pip install -r requirements.txt
How to run:
Run 20 by 20 field with 40% live cells for 3 iterations with in-line animation at 0.5 sec per frame.
python life.py -s 20 -d 40 -fd 0.5 -i 3
Help
python life.py -h
usage: life.py [-h] [-s SIZE] [-d CELL_DENSITY] [-na] [-fd FDELAY] [-i ITERS]
[-rn RNSEED]
optional arguments:
-h, --help show this help message and exit
-s SIZE, --size SIZE size of square game field
-d CELL_DENSITY, --cell_density CELL_DENSITY
percent of live cells at start
-na, --noanimation run without command line animation
-fd FDELAY, --fdelay FDELAY
animation frame delay
-i ITERS, --iters ITERS
number of game repeats
-rn RNSEED, --rnseed RNSEED
select random seed to start
Limits for arguments
'size': (2, 51),
'cell_density': (10, 90),
'fdelay': (0.1, 1),
'iters': (1, 1001),
'rnseed':(0, 1000)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file game_of_life_gofl-0.0.1-py3-none-any.whl.
File metadata
- Download URL: game_of_life_gofl-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5be5a0c60a5dace5f57930c5eee3e4c73b1a9c9acee4302b0cf5bd3b8a693185
|
|
| MD5 |
3fd9103169ab3eca29b56741b22167a7
|
|
| BLAKE2b-256 |
efe640f89dcfcf69cab738017f615884501b552cb7c5ad7acae81289356553bb
|