add finish game logic