Drink in that impressive title for a moment. It's definitely better than the reality of me saying "I implemented Conway's Game of Life ... in Processing ... poorly ... using Khan Academy's online code editor". It's the truth, though.
After working on pixel drawings with the kids, I was inspired to try more programs of my own. Having never implemented the Game of Life before, I thought it would be a good opportunity to put my recently-discovered expertise with pixel drawing to work. The rules of the game are simple:
- If a live cell has fewer than 2 neighbors, it dies (from underpopulation)
- If a live cell has more than 3 neighbors, it dies (from overcrowding)
- If a live cell has 2 or 3 neighbors, it lives on to the next generation
- If a dead cell has exactly 3 neighbors, it is born (from reproduction)
The bonus is that it's a "zero player" game — my favorite!