Game of Life skeleton: how the goroutines and channels fit together

An animated model of the provided skeleton and one common way of filling its gaps. Messages travel along channels; click any box or channel to inspect it. It is a teaching model, not your solution, and your own design may differ.

provided and already wired declared but nil in the skeleton: you create it suggested addition (your design) the distributor body: you write it
Press a key in the SDL window:

What is happening

Press Start. The model begins at main() and follows the program: start-up, loading the image, evolving turns, the 2 s ticker, key presses, saving, and shutting down.

Inspector

Click a goroutine or a channel in the diagram.

The SDL window

frames drawn: 0dirty: false

The window only changes when a frame is drawn: on a 60 FPS tick, and only if a TurnComplete event has set dirty. Flips alone change a hidden pixel buffer.

Console (what the skeleton logs)

Message log

Things the skeleton warns about (and why)