Nearly completed game logic.