Game of Life
This is my take on Conway's Game of Life.
It is written in Go using the 2D library Pixel.
Running
You need OpenGL development libraries to run this. Read more here.
Clone the repository.
git clone https://github.com/carltheperson/game-of-life
Install dependencies.
go get
Run project.
go run .
Note that the game starts paused with no cells
Controls
Description |
Key |
Pausing/unpausing |
SPACE |
Fill with random cells |
R |
Clear all cells |
C |
Place cell |
LEFT CLICK |
Remove cell |
RIGHT CLICK |
Configurations
At the top of the main.go
file you will find all the configurations.
Change their value to change the functionality of the game.
They currently look like this.
var (
title = "Game of life"
windowResizable = false
fps = 10
cellSize = 10.0
cellAmount = 50
padding = 1.0
cellColor = colornames.Darkcyan
backgroundColor = colornames.Lightcyan
)
Here is an example with different colors.
License
This project is licensed under the MIT License - see the LICENSE file for details