Simulation code for a grid of lighted squares.