Zachary W. Huang

Home Projects Blog Guides Resume

Conway’s Game of Life in C++

The code can be found here.

John Conway’s Game of Life needs no introduction (but here is one anyway). The Game of Life is a cellular automata consisting of a big grid of cells which can be either alive or dead.

The game begins with any arrangement of living and dead cells, and the game progresses with these two rules:

  • If a dead cell has 3 living neighbors, it becomes alive.
  • If a living cell has less than 2 living neighbors or more than 3 living neighbors it dies (of underpopulation and overpopulation, respectively).

These simple rules can result in extremely complex and unpredictable behavior.

As a challenge for myself, I implemented the Game of Life in C++.

Here is the result:

RSS icon github logo linkedin logo

Zachary W. Huang © 2021-2024