Game of Life — Setup

This week I will be working on Conway’s Game of Life, and starting Coursera’s Data Structures and Algorithms course.

[Conway’s Game of Life] is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves, or, for advanced “players”, by creating patterns with particular properties.

My understanding is that there is a grid that is full of cells; and the cells are either living or not living.

Every generation, the grid changes based on the following set of rules:

  1. Any live cell with fewer than two live neighbours dies, as if caused by underpopulation.
  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 overpopulation.
  4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

So far, I’ve created my repository and my Grid and Cell classes. My mind is going off in different directions with how I want to do it, but I need to remind myself to take it one step at a time, and strictly TDD it, rather than overthinking it at the start.