From 5dbdea4de118780e3d44eb91d7ab7c9c01b5bb72 Mon Sep 17 00:00:00 2001 From: Jerry Date: Sat, 3 Aug 2019 16:20:58 +0800 Subject: [PATCH] randomize the first player --- game.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/game.py b/game.py index 3234f9b..900de8a 100644 --- a/game.py +++ b/game.py @@ -22,6 +22,8 @@ import logging from config import ADMIN_LIST, OPEN_LOBBY, DEFAULT_GAMEMODE, ENABLE_TRANSLATIONS from datetime import datetime +from random import choice as rand_choice + from deck import Deck import card as c @@ -69,6 +71,9 @@ class Game(object): else: self.deck._fill_wild_() + # randomize the first player + self.current_player = rand_choice(self.players) + self._first_card_() self.started = True