Skip to content

vitamys/cpp-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 

Repository files navigation

cpp-project

December 2023

how to use this repo:

main branch: fully functional Game of Life, playable in four quadrants. Colors of the patterns are per type of pattern

observerpattern: experimental implementation of an observer pattern. this implementation is not stable! it shows the exploration of topics during the project.

Game of Life

The game of life is a cellular automaton created by John Horton Conway in 1970. As soon as the game has started, there is no further input by the player. It consists of an grid of cells, where every cell can either be alive or dead and is updated every generation, according to its interaction with its eight neighbours. This interaction is determined by rules, which define whether a cell will stay alive or die in the next generation.

Rules

They work as following:

  • A live cell surrounded by fewer than two living cells dies, because of underpopulation.
  • A live cell surrounded by two or three living cells stays alive.
  • A live cell surrounded by more than three living cells dies, because of overpopulation.
  • A dead cell surrounded by exactly three living cells becomes alive, due to reproduction.​

To make the game more interesting, there will be different patterns of alive and dead cells, which can be chosen at the beginning of the game. These patterns will then change over generations, according to the specified rules.

Patterns

There are different types of patterns, that are grouped by how they move over generations in the grid.

Still lifes

These are non-moving patterns. Here, all these patterns are shown in generation 1: image

Oscillators

These are moving patterns which will return to their initial state after a certain number of generations. image

Spaceships

These patterns are similar to the Oscillators, they will also return to their inital state after a certain number of generations, however on a different location on the grid. image

Methuselahs

These are moving patterns which evolve for a long period of generations before stabilizing themselves. image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published