Chapter 3
Interact with the Grid
Section 4
Crash Test the Click Handler
In this lesson, we test the code to add live cells to the grid. Follow along in the video below and test yourself by reloading your page. Try clicking on cells in the grid. If you click on an empty cell—that is, a dead cell—you should see it come alive. If you change your mind, just click on the cell again to change it back to dead. We've visually added live cells to the grid, so you can see when a cell is live or dead. But, so far, our grid doesn't actually do anything interesting. Think at a high level about what we still need to do to turn this visual representation into the Game of Life? What are the steps? Think about the model-view-controller design we talked about in a previous lesson; how does what you've done so far fit into that design?