game-of-life

command module
v0.0.0-...-9548b36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2021 License: MIT Imports: 6 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL