An implementation of Conway's Game of Life.

Conway's Game of Life

From Wikipedia, the free encyclopedia:

The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. The game is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves, or, for advanced players, by creating patterns with particular properties

The evolution of the cells follows this four simple rules:

  1. Any live cell with fewer than two live neighbors dies, as if by underpopulation.
  2. Any live cell with two or three live neighbors lives on to the next generation.
  3. Any live cell with more than three live neighbors dies, as if by overpopulation.
  4. Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.

About implementation

This is a running implementation of Conway's life game written on go.
For graphical implementation, the ebiten 2d engine was used.

Usage

The implementation has the following modes.

  1. Random fill mode
  2. Drawing mode
  3. Mode of ready-made figures

Random fill mode

In this mode, the first generation of cells is randomly generated.

Usage:

Random mode can be started by pressing the key (G).
Then press the key Enter to start the game.

Random fill mode

Drawing mode

Drawing mode will allow you to experiment by creating new shapes with the mouse

Usage:

Press the key ESC for stopping the game.
Then you can draw the shape with the LCM(left click mouse).
For the eraser, hold the Lshift(left shift) and use the left mouse button to delete the cells.

Drawing mode

Mode of ready-made figures

The ready-made shapes' mode allows you to use ready-made shapes from this list.
The list will be updated.

  1. Glider

Usage:

Press the number of the shape you want to use.
The shape will be drawn on the screen.
And for rotate the shape, press the RCM(right click mouse).

Drawing mode

other tips for managing the game can be found in the upper left corner

Install

To quickly start the game, use this command.

go run -tags=example github.com/fr13n8/game-of-life@latest
Similar Resources

FlappyCalf - a game powered by Go+ spx game engine

FlappyCalf - a game powered by Go+ spx game engine

FlappyCalf - a game powered by Go+ spx game engine How to run Download Go+ and build it. See https://github.com/goplus/gop#how-to-build. Download this

Nov 6, 2022

MazePlay - a game powered by Go+ spx game engine

MazePlay - a game powered by Go+ spx game engine

MazePlay - a game powered by Go+ spx game engine How to run Download Go+ and build it. See https://github.com/goplus/gop#how-to-build. Download this g

Dec 16, 2021

A simple game that I created with Ebiten game library as a way to teach myself Go. Enjoy!

A simple game that I created with Ebiten game library as a way to teach myself Go. Enjoy!

galactic-asteroid-belt Overview A simple game that I created with Ebiten game library as a way to teach myself Go. Enjoy! Run To run, you will need Go

Dec 2, 2021

RundQuiz-Game - This is a Go exercise that implements and builds a quiz game from a list of math questions in a CSV file.

Go RundQuiz Game Exercise details This exercise is broken into two parts to help simplify the process of explaining it as well as to make it easier to

Jan 5, 2022

Simple 2D game to teach myself various things about game development and ECS, etc

2d-grass-game I really don't know what to name this game. Its a big grass field, and its in 2d so....2D Grass game This is a simple 2D game to teach m

Jan 17, 2022

An implementation of the popular game Codenames created with Go and React.

OpenCodenames A real-time implementation of Codenames created with React/TypeScript and Golang. You can play the game here! Installation Stack: React

Aug 8, 2021

Go implementation of 2048 game

Go implementation of 2048 game

Oct 21, 2021

snake game implementation using 2d array in Go

snake game implementation using 2d array in Go

Snake Game Implementation Snake game implementation in Go using a 2-dimensional array. Demo Install download the package git clone https://github.com/

May 14, 2022

a Go implementation of the game of Briscola

BrisGolang BrisGolang is a Go implementation of the game of briscola using the WebSocket protocol for client/server communication. Usage You can play

Sep 15, 2022
An implementation of Conway's Game of Life.
An implementation of Conway's Game of Life.

Conway's Game of Life From Wikipedia, the free encyclopedia: The Game of Life, also known simply as Life, is a cellular automaton devised by the Briti

Mar 16, 2022
A simulation of John Conway's Game of Life cellular automaton.
A simulation of John Conway's Game of Life cellular automaton.

Conway's Game of Life John Conway's Game of Life is a cellular automaton and is played on a 2D grid of cells. Each cell can be either alive or dead. T

Oct 8, 2021
CSA Coursework: Game of Life
 CSA Coursework: Game of Life

CSA Coursework: Game of Life Video Walkthrough of Parallel Component (skip to 04:20 to skip IntelliJ install and project opening steps) Please note th

Oct 31, 2022
Implementação em vue.js do famoso jogo Game of Life de John Horton Conway

Game of Life Time de desenvolvimento Gabriel Izoton Mateus Santos Desenvolvimento Local npm install npm start Para uma melhor experiência de desenvolv

Dec 17, 2021
Quality of life tool for diablo2r. Automatically counts up and writes the game name into clipboard.
Quality of life tool for diablo2r. Automatically counts up and writes the game name into clipboard.

counterbaal Quality of life tool for people hosting diablo2 baalruns. Automatically counts up and writes the game name into clipboard. Probably only u

Jan 1, 2022
Game Of Life In Golang
Game Of Life In Golang

Game-Of-Life-In-Go-lang The universe of the Game of Life is an infinite, two-dim

Jan 17, 2022
Simple Solution of Conway's Game of Life
Simple Solution of Conway's Game of Life

CONWAY-S-GAME-OF-LIFE-IN-GOLANG Simple Solution of Conway's Game of Life The universe of the Game of Life is is represented as a two dimensional array

Jan 10, 2022
Arkanoid game in Go using Ebiten game engine with ECS.
Arkanoid game in Go using Ebiten game engine with ECS.

Arkanoid-go Arkanoid game in Go using Ebiten game engine with ECS. You must have Git LFS installed when cloning the repository to download assets. See

Oct 9, 2022
AircraftWar - a game powered by Go+ spx game engine
AircraftWar - a game powered by Go+ spx game engine

AircraftWar - a game powered by Go+ spx game engine How to run Download Go+ and build it. See https://github.com/goplus/gop#how-to-build. Download thi

Jan 5, 2022
FlappyCalf - a game powered by Go+ spx game engine
FlappyCalf - a game powered by Go+ spx game engine

FlappyCalf - a game powered by Go+ spx game engine How to run Download Go+ and build it. See https://github.com/goplus/gop#how-to-build. Download this

Nov 6, 2022