Finish game logic