Update the game module to handle game end properly.