https://github.com/sv443/conways-clife
Conway's Game of Life in the Command Line Interface. Has a live editor and a bunch of presets.
https://github.com/sv443/conways-clife
cli command-line command-line-game conway-game conways-game-of-life game game-of-life javascript js
Last synced: 7 months ago
JSON representation
Conway's Game of Life in the Command Line Interface. Has a live editor and a bunch of presets.
- Host: GitHub
- URL: https://github.com/sv443/conways-clife
- Owner: Sv443
- License: mit
- Created: 2020-06-01T21:25:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-22T15:28:21.000Z (over 5 years ago)
- Last Synced: 2025-02-14T12:53:14.659Z (8 months ago)
- Topics: cli, command-line, command-line-game, conway-game, conways-game-of-life, game, game-of-life, javascript, js
- Language: JavaScript
- Homepage:
- Size: 197 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.txt
- License: LICENSE.txt
Awesome Lists containing this project
README
# Conways Game of CLIfe
[](https://sv443.net/LICENSE)
[](https://github.com/Sv443/Conways-CLIfe/actions)
[](https://snyk.io/test/github/Sv443/Conways-CLIfe)
[](https://sv443.net/discord)
[](#readme)
## Info:
Conway's Game of Life in the Command Line Interface.
Features a bunch of premade presets, a random generator and an editor to create your own presets.
I strongly recommend using CMD, Git Bash or zsh to run this since it renders better than other terminal apps.
### This game is part of my [CLI Games Collection](https://github.com/Sv443/CLI-Games-Collection)
### You can download a standalone version here: [](https://github.com/Sv443/Conways-CLIfe/releases)
## Steps to build:
1. Have Node.js and npm installed (I recommend the latest v14)
2. Download or clone the repo and open a terminal in the downloaded folder
3. Install dependencies by running the command `npm i` in the terminal
4. Run the command `npm run build` to build the executables (they will be located in the `dist` folder)
## Rules of Conway's game of life:
| | |
| --- | --- |
| Births | Each dead cell adjacent to exactly three live neighbors will become live in the next generation. |
| Death by isolation | Each live cell with one or fewer live neighbors will die in the next generation. |
| Death by overcrowding | Each live cell with four or more live neighbors will die in the next generation. |
| Survival | Each live cell with either two or three live neighbors will remain alive for the next generation. |
## Dependencies:
- [fs-extra](https://npmjs.com/package/fs-extra)
- [keypress](https://npmjs.com/package/keypress)
- [perlin-noise](https://npmjs.com/package/perlin-noise)
- [svjsl](https://npmjs.com/package/svjsl)
- [unzipper](https://npmjs.com/package/unzipper)