diff --git a/tong-its.py b/tong-its.py index ddcae65..3e041b9 100644 --- a/tong-its.py +++ b/tong-its.py @@ -1008,6 +1008,13 @@ async def main(state_info): else: winner = top_challengers[0][0] + # Print winner + if winner != -2: + server.players[winner].score += 1 + print(f'{server.players[winner].name} won (id={winner})!\n') + else: + print('Nobody exposed a meld; nobody wins.\n') + # Send final gamestate await send_gamestate(ret_val, server, winner) @@ -1015,11 +1022,6 @@ async def main(state_info): os.system('clear') host_display(server) - # Print winner - if winner != -2: - server.players[winner].score += 1 - print(f'{server.players[winner].name} won (id={winner})!\n') - # Ask host if they want to host again with same players print('Rematch? Enter \'q\' to not rematch.') choice = input('\n> ')