golpy


Namegolpy JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/zeta611/py-game-of-life
SummaryEfficient Conway's Game of Life using NumPy
upload_time2024-05-01 04:41:46
maintainerNone
docs_urlNone
authorJay Lee
requires_python<4.0,>=3.9
licenseMIT
keywords game of life
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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)

## Installation

```sh
pip install golpy
```

## Usage

```sh
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
```

To use without installing,

```sh
python -m golpy # ...
```

## Input Format

```txt
........................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)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zeta611/py-game-of-life",
    "name": "golpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "Game of Life",
    "author": "Jay Lee",
    "author_email": "jaeho.lee@snu.ac.kr",
    "download_url": "https://files.pythonhosted.org/packages/6d/2f/b11fecc81c2d510accd8031fe5e9ffeff04fcda9f27fe099b1368a89bf9c/golpy-0.3.0.tar.gz",
    "platform": null,
    "description": "# GoLPy\n\n[![GitHub\nlicense](https://img.shields.io/github/license/Zeta611/golpy?style=flat-square)](https://github.com/Zeta611/golpy/blob/master/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/golpy?style=flat-square)](https://pypi.org/project/golpy/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)\n\nGoLPy is an efficient Conway's Game of Life implemented in Python using NumPy.\n\n## Example Output\n\nThe following GIF can be generated using the command:\n\n```sh\nlife --demo glidergun --out glider_gun.gif --ppc 10 --pos TL -W60 -H40\n```\n\n![The Gosper Glider Gun](glider_gun.gif)\n\n## Installation\n\n```sh\npip install golpy\n```\n\n## Usage\n\n```sh\nusage: life [-h] (-i GRID_INPUT | -d DEMO) [-o FILE | --debug-print]\n            [-W WIDTH] [-H HEIGHT] [-M MAX_GEN] [--ppc PIXELS] [-P POSITION]\n            [-p]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -i GRID_INPUT, --in GRID_INPUT\n                        Parse the initial grid from <GRID_INPUT>\n  -d DEMO, --demo DEMO  Try one of the provided demos: one of 'glidergun' and\n                        'glidergen'\n  -o FILE, --out FILE   Place the output into <FILE>\n  --debug-print         Print the generated frames directly to the terminal,\n                        instead of saving them\n\n  -W WIDTH, --width WIDTH\n                        Width of the grid\n  -H HEIGHT, --height HEIGHT\n                        Height of the grid\n\n  -M MAX_GEN, --max-gen MAX_GEN\n                        Number of generations to simulate\n  --ppc PIXELS          Set the width and the height of each cell to <PIXELS>\n  -P POSITION, --pos POSITION\n                        One of 'C', 'T', 'B', 'L', 'R', 'TL', 'TR', 'BL', and\n                        'BR'\n\n  -p, --profile         Measure the performance\n```\n\nTo use without installing,\n\n```sh\npython -m golpy # ...\n```\n\n## Input Format\n\n```txt\n........................O\n......................O.O\n............OO......OO............OO\n...........O...O....OO............OO\nOO........O.....O...OO\nOO........O...O.OO....O.O\n..........O.....O.......O\n...........O...O\n............OO\n```\n\nUse `.` for a dead cell, `O` (`chr(79)`) for a live cell.\n\n## License\n\n[MIT](LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Efficient Conway's Game of Life using NumPy",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://github.com/zeta611/py-game-of-life",
        "Repository": "https://github.com/zeta611/py-game-of-life"
    },
    "split_keywords": [
        "game",
        "of",
        "life"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c153a70d29d911da5182430292e8c04d5a38612120a1e99c563446d07430ff98",
                "md5": "1f5b2bc0d8ef8fce0007d07d3357e345",
                "sha256": "26ed4648356a87baafa11a6cdba7e528226f8b1f9337968bd7d5652a79436d78"
            },
            "downloads": -1,
            "filename": "golpy-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1f5b2bc0d8ef8fce0007d07d3357e345",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 6865,
            "upload_time": "2024-05-01T04:41:44",
            "upload_time_iso_8601": "2024-05-01T04:41:44.839529Z",
            "url": "https://files.pythonhosted.org/packages/c1/53/a70d29d911da5182430292e8c04d5a38612120a1e99c563446d07430ff98/golpy-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6d2fb11fecc81c2d510accd8031fe5e9ffeff04fcda9f27fe099b1368a89bf9c",
                "md5": "2689effff6ef6084a31e3e91d0a3944a",
                "sha256": "dc5ecef4f293f597801f08836a0c08380cf725c4aaac254286aca5e591111799"
            },
            "downloads": -1,
            "filename": "golpy-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2689effff6ef6084a31e3e91d0a3944a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 5744,
            "upload_time": "2024-05-01T04:41:46",
            "upload_time_iso_8601": "2024-05-01T04:41:46.565246Z",
            "url": "https://files.pythonhosted.org/packages/6d/2f/b11fecc81c2d510accd8031fe5e9ffeff04fcda9f27fe099b1368a89bf9c/golpy-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-01 04:41:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zeta611",
    "github_project": "py-game-of-life",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "golpy"
}
        
Elapsed time: 0.24886s