Chapter 3
Interact with the Grid
Section 1
Introduction
The grid is in place, but it's just sitting there, staring at us, doing nothing—if only we could interact with the grid to turn on some cells. In this module, we're going to do just that, by adding a click handler and then using our CSS powers to turn on and off cells. We'll also add some buttons to the interface. The buttons will give us a way of controlling the flow of the Game of Life so we can start the game, stop it or continue computing new generations. We can also wipe the grid clear and start over. We're going to set up click handler functions to do some work when the user clicks on the buttons. Then in later modules, we'll implement their complete functionality.