Skip to content

A simulation of Conway's Game of Life in C++ with a Glider (spaceship) example

Notifications You must be signed in to change notification settings

hasit/gameoflife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gameoflife

Description

A simulation of Conway's Game of Life in C++ with a Glider (spaceship) example.

TO DO

Not in order of importance

  • Get grid size and initial pattern from user (command-line/run-time)
  • Make it continuous
  • Support different rule sets
  • Add graphics

How to run

$ git clone https://github.com/hasit/gameoflife.git
$ cd ~/gameoflife/
$ g++ gameoflife.cpp -o gol
$ ./gol

Rules

At each step in time, the following transitions occur:

  1. Any live cell with fewer than two live neighbours dies, as if caused by under-population.
  2. Any live cell with two or three live neighbours lives on to the next generation.
  3. Any live cell with more than three live neighbours dies, as if by overcrowding.
  4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

Given example of Spaceship - Glider

Other examples of patterns

Wikipedia reference

About

A simulation of Conway's Game of Life in C++ with a Glider (spaceship) example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages