Skip to content

liweiyap/Conway_GameOfLife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conway_GameOfLife

This is an implementation of Conway's Game of Life in C++. Build and run it directly with Qt Creator.

Description

According to Wikipedia, "the Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970".

Given a board with m by n cells, each cell has an initial state live (1) or dead (0). Each cell interacts with its eight neighbours (horizontal, vertical, or diagonal) using the following four rules:


Source: https://qualityswdev.com/2011/07/31/conways-game-of-life-in-scala/

  1. Any live cell with fewer than two live neighbours dies, as if caused by under-population (inability to reproduce?).
  2. Any live cell with two or three live neighbours lives on to the next generation (ideal population density).
  3. Any live cell with more than three live neighbours dies, as if by over-population (scarce nutrients).
  4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction (ideal population density).

Demo

Requirements

  • Qt (tested with version 5.15.2)
  • Qt Creator (tested with version 4.15.0)

Acknowlegements

My UI design follows very closely that of Anjana Sofia Vakil. The source code and the implementation, however, are different; hers is in any case made in JavaScript.

License

GNU General Public License v3.0 © Li-Wei Yap

About

An implementation of Conway's Game of Life using Qt.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published