{"id":16282966,"url":"https://github.com/paulrobello/rich_life","last_synced_at":"2025-08-03T06:30:56.358Z","repository":{"id":257472297,"uuid":"858432085","full_name":"paulrobello/rich_life","owner":"paulrobello","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-19T03:54:54.000Z","size":740,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-27T21:19:12.732Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulrobello.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-16T22:07:48.000Z","updated_at":"2024-11-22T20:17:47.000Z","dependencies_parsed_at":"2024-10-27T21:41:33.772Z","dependency_job_id":null,"html_url":"https://github.com/paulrobello/rich_life","commit_stats":null,"previous_names":["paulrobello/rich_life"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulrobello%2Frich_life","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulrobello%2Frich_life/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulrobello%2Frich_life/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulrobello%2Frich_life/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulrobello","download_url":"https://codeload.github.com/paulrobello/rich_life/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228528599,"owners_count":17933283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T19:12:11.072Z","updated_at":"2024-12-06T21:44:17.904Z","avatar_url":"https://github.com/paulrobello.png","language":"Python","funding_links":["https://buymeacoffee.com/probello3"],"categories":["\u003ca name=\"animation\"\u003e\u003c/a\u003eAnimation"],"sub_categories":[],"readme":"# Conway's Game of Life and Langton's Ant\n\n\n[![PyPI](https://img.shields.io/pypi/v/rich_life)](https://pypi.org/project/rich_life/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/rich_life.svg)](https://pypi.org/project/rich_life/)  \n![Runs on Linux | MacOS | Windows](https://img.shields.io/badge/runs%20on-Linux%20%7C%20MacOS%20%7C%20Windows-blue)\n![Arch x86-63 | ARM | AppleSilicon](https://img.shields.io/badge/arch-x86--64%20%7C%20ARM%20%7C%20AppleSilicon-blue)  \n![PyPI - License](https://img.shields.io/pypi/l/rich_life)\n\n## About\nThis project implements Conway's Game of Life and Langton's Ant.  \nBoth are cellular automaton simulations.\nUses Rich for terminal visualization.\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/probello3)\n\n## Screenshots\n![Game of Life Screenshot](https://raw.githubusercontent.com/paulrobello/rich_life/main/life-screenshot.png)\n![Langton's Ant Screenshot](https://raw.githubusercontent.com/paulrobello/rich_life/main/ants-screenshot.png)\n\n## Installation\n\nTo install make sure you have Python 3.11 or higher and [uv](https://pypi.org/project/uv/) installed.\n\n### Installation From Source\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/paulrobello/rich_life.git\n   cd rich_life\n   ```\n\n2. Install the required dependencies:\n   ```bash\n   uv sync\n   ```\n\n### Installation From PyPI\n\nTo install from PyPI, run any of the following commands:\n\n```bash\nuv tool install rich-life\n```\n\n```bash\npipx install rich-life\n```\n\n## Usage\n\n### Running if installed from PyPI\n```bash\nrich_life\n```\n\n### Running from source\nRun the Game of Life simulation using the following command:\n\n```bash\nuv run rich_life\n```\n\nYou can customize the grid size, number of generations, and neighborhood rules using command-line options:\n\n```bash\nuv run rich_life --width 50 --height 30 --generations 300 --rules moore\n```\n\nRun the Langton's Ant simulation using the following command:\n\n```bash\nuv run rich_life --mode ants\n```\n\n\nAvailable options:\n- `--width` or `-w`: Width of the grid (default: half of console height)\n- `--height` or `-h`: Height of the grid (default: half of console height minus 2)\n- `--infinite` or `-i`: Enable infinite mode. Simulation grid has no bounds (default: False)\n- `--generations` or `-g`: Number of generations to simulate (default: 100)\n- `--mode` or `-m`: Simulation mode (options: 'life' or 'ants', default: 'ants')\n- `--rules` or `-r`: Neighborhood rules for game of life (options: 'moore' or 'van_neumann', default: 'moore')\n- `--offset-x` or `-x`: Bord display X-coordinate offset for infinite mode (default: 0)\n- `--offset-y` or `-y`: Bord display Y-coordinate offset for infinite mode (default: 0)\n- `--rps` or `-r`: Refresh / generations per second (default: 10)\n- `--follow` or `-f`: Follow the ant in ANTS mode (default: False)\n\n\nKeys:\n- 'Arrows' / 'WSAD': Pan the grid\n\n## Running Tests\n\nTo run the tests, use the following command:\n\n```bash\nuv run pytest tests/test_game_of_life.py\n```\n\n## What's New\n\n- Version 0.3.0: Added follow mode for Langton's Ant\n- Version 0.2.0: Better keyboard handling\n- Version 0.1.0: Initial release\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is open source and available under the [MIT License](LICENSE).\n\n## Author\n\nPaul Robello (probello@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulrobello%2Frich_life","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulrobello%2Frich_life","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulrobello%2Frich_life/lists"}