Metadata-Version: 2.1
Name: golpy
Version: 0.2.0
Summary: Efficient Conway's Game of Life using NumPy
Home-page: https://github.com/zeta611/py-game-of-life
License: MIT
Keywords: Game of Life
Author: Jay Lee
Author-email: jaeho.lee@snu.ac.kr
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: Pillow (>=8.1.0,<9.0.0)
Requires-Dist: numpy (>=1.20.1,<2.0.0)
Project-URL: Repository, https://github.com/zeta611/py-game-of-life
Description-Content-Type: text/markdown

# GoLPy
[![GitHub
license](https://img.shields.io/github/license/Zeta611/golpy?style=flat-square)](https://github.com/Zeta611/golpy/blob/master/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/golpy?style=flat-square)](https://pypi.org/project/golpy/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)

GoLPy is an efficient Conway's Game of Life implemented in Python using NumPy.

## Example Output
The following GIF can be generated using the command:
```sh
life --demo glidergun --out glider_gun.gif --ppc 10 --pos TL -W60 -H40
```

![The Gosper Glider Gun](glider_gun.gif)

## Usage
```
usage: life [-h] (-i GRID_INPUT | -d DEMO) [-o FILE | --debug-print]
            [-W WIDTH] [-H HEIGHT] [-M MAX_GEN] [--ppc PIXELS] [-P POSITION]
            [-p]

optional arguments:
  -h, --help            show this help message and exit
  -i GRID_INPUT, --in GRID_INPUT
                        Parse the initial grid from <GRID_INPUT>
  -d DEMO, --demo DEMO  Try one of the provided demos: one of 'glidergun' and
                        'glidergen'
  -o FILE, --out FILE   Place the output into <FILE>
  --debug-print         Print the generated frames directly to the terminal,
                        instead of saving them

  -W WIDTH, --width WIDTH
                        Width of the grid
  -H HEIGHT, --height HEIGHT
                        Height of the grid

  -M MAX_GEN, --max-gen MAX_GEN
                        Number of generations to simulate
  --ppc PIXELS          Set the width and the height of each cell to <PIXELS>
  -P POSITION, --pos POSITION
                        One of 'C', 'T', 'B', 'L', 'R', 'TL', 'TR', 'BL', and
                        'BR'

  -p, --profile         Measure the performance
```

## Input Format
```
........................O
......................O.O
............OO......OO............OO
...........O...O....OO............OO
OO........O.....O...OO
OO........O...O.OO....O.O
..........O.....O.......O
...........O...O
............OO
```

Use `.` for a dead cell, `O` (`chr(79)`) for a live cell.

## License
[MIT](LICENSE)

