Skip to content
/ gol Public

A graphical implementation of Conway's Game of Life

License

Notifications You must be signed in to change notification settings

viswa/gol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jun 15, 2021
72045df · Jun 15, 2021

History

17 Commits
May 18, 2021
Apr 18, 2021
Apr 18, 2021
Jun 15, 2021
May 11, 2021
Apr 18, 2021
May 18, 2021
May 18, 2021
Apr 28, 2021

Repository files navigation

Gol

A graphical implementation of Conway's Game of Life

Game of Life Output GIF

About

The Game of Life, is a cellular automation, a zero-player game, devised by John Horton Conway. The game evolves solely based on its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves. It is Turing complete and can simulate a universal constructor or any other Turing machine.

The universe of the Game of Life is an infinite, two-dimensional grid of square cells, each of which is in one of two possible states, live or dead. Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent.

Simplified rules of the game

  1. Any live cell with two or three live neighbours survives.
  2. Any dead cell with three live neighbours becomes a live cell.
  3. All other live cells die in the next generation. Similarly, all other dead cells stay dead.

Implementation

gol starts by randomly initializing a universe state, drawing and updating it every 40 milliseconds.

Window creation and drawing is done through pixel library.

Installation and Usage

Install the latest version in $GOBIN or $GOROOT/bin by

go get github.com/viswa/gol@latest

To run the simulation

gol

License

Gol is licensed under MIT License.

About

A graphical implementation of Conway's Game of Life

Topics

Resources

License

Stars

Watchers

Forks

Languages