moved the event handlers into the grid, which checks what mode the game is in