"La Vie En Go" is a concise and efficient implementation of Conway's Game of Life in Go (Golang). Started as a weekend project; aimed to provide a simple (and fun!) platform for exploring and visualising this cellular automaton in a terminal-based environment.
- Terminal-Based Visualization: Watch the evolution of cells directly in your terminal.
- Custom Initial Configurations: Input your starting configurations to explore different patterns and behaviors.
- User Control: Pause the game and move forward step by step for more detailed observation of the cells' evolution. Resume the automatic evolution afterwards.
- Stop Condition: The game halts automatically when it detects no further changes or no life within the visible area, allowing for finite observation of the game.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Go (Golang) installed on your system (installation guide)
- Clone the repository:
git clone https://github.com/ahmad-alkadri/LaVieEnGo.git
- Navigate to the cloned directory:
cd LaVieEnGo
- Run the game:
For interactive mode, where you can input your initial cells:
go run main.go
To run with predefined cell coordinates:
go run main.go -c "x1 y1, x2 y2, ..."
After starting the game, you'll be prompted to input the initial live cells' coordinates, or you can use the -c
flag to specify them as arguments. The game progresses automatically, showing each new generation in your terminal.
- Block:
-c "1 1, 1 2, 2 1, 2 2"
- Glider:
-c "1 2, 2 3, 3 1, 3 2, 3 3"
- Blinker:
-c "2 1, 2 2, 2 3"
There are also some patterns in the examples
folder.
Example on how to run them:
go run main.go < examples/heart.txt
Distributed under the MIT License. See LICENSE
for more information.
- John Conway, for the original concept of the Game of Life.