https://github.com/danthe1st/ascii-of-life
https://github.com/danthe1st/ascii-of-life
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/danthe1st/ascii-of-life
- Owner: danthe1st
- License: gpl-3.0
- Created: 2020-10-09T17:02:21.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-09T17:40:42.000Z (over 2 years ago)
- Last Synced: 2025-02-17T09:45:08.561Z (8 months ago)
- Language: Java
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ASCII of Life
A terminal implementation of [Conway's Game Of Life (and death)](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) made in javaConway's Game Of Life is a 2D-grid by John Horton Conway.
Every Cell can have 2 states: alive or dead.## Video
https://user-images.githubusercontent.com/34687786/217893878-aadfe82a-de5b-4d16-b457-f858d6bbe9c1.mp4
## Rules
* Any live cell with fewer than two live neighbors dies in the next generation, as if by under population.
* Any live cell with two or three live neighbors lives on to the next generation.
* Any live cell with more than three live neighbors dies in the next generation, as if by overpopulation.
* Any dead cell with exactly three live neighbors becomes a live cell in the next generation, as if by reproduction.## Requirements
* JDK >= 8
* Linux is recommended
* a shell## Run it
At first, create a directory `bin` for your `.class` files.
You can compile ASCII of Life using the command `javac src\io\github\danthe1st\ascii\of\life\*.java -d bin`.
You then need to `cd` into the `bin` directory.
After that, you can run it using `java io.github.danthe1st.ascii.of.life.ASCIIOfLife`
## This implementation
If you use a linux terminal, you can enter commands by just pressing the corresponding button, on windows, you need to press after that.The following commands are available:
|Button|Description|
|---|---|
|space|start/stop the automatic simulation|
|l|show the current game|
|n|move one generation forward|
|r|randomize the game|
|c|clear the game field|
|q|exit|
|wasd|move the cursor|
|u|change the state of the cell the cursor is pointing to|
|t|load a template|