Skip to content

kulapard/gol

Repository files navigation

Game of Life

GitHub Latest Release) GitHub license Build Status Build Status codecov Go Report Card

Conway's Game of Life written in Go

screencast

Install

Using Homebrew (OS X / Linux)

brew install kulapard/tap/gol

Update

Using Homebrew (OS X / Linux)

brew upgrade kulapard/tap/gol

Usage

Run with default parameters (size 30 x 40, random initial state):

gol run

Run initial state from file:

gol run --file ./examples/board.txt

To specify the size of the board and speed of the game:

gol run --rows 30 --cols 40 --speed 10

File format:

  • . (dot) - dead cell
  • 0 (zero) - alive cell
  • (space) - ignored, uses for readability
  • \n (new line) - end of row
  • all other characters cause a parsing error

Example:

. . . . .
. . 0 . .
. 0 . 0 .
. . 0 . .
. . . . .

To see all available options:

gol run --help

License

This project is licensed under the MIT License. See the LICENSE file for more information.