Recognize when the game is over.