First game logic.