This is an implementation of Conway's Game of Life in C++. Build and run it directly with Qt Creator.
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/
- Any live cell with fewer than two live neighbours dies, as if caused by under-population (inability to reproduce?).
- Any live cell with two or three live neighbours lives on to the next generation (ideal population density).
- Any live cell with more than three live neighbours dies, as if by over-population (scarce nutrients).
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction (ideal population density).
- Qt (tested with version 5.15.2)
- Qt Creator (tested with version 4.15.0)
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.
GNU General Public License v3.0 © Li-Wei Yap