Forráskód Böngészése

Allow manual control of game id

Pjotir 10 hónapja
szülő
commit
7d25d25b24
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      game.py

+ 2 - 2
game.py

@@ -25,8 +25,8 @@ class Player:
 
 
 class Game:
-    def __init__(self, name, hand_size, match_amount, turns):
-        self.id = randomword(5)
+    def __init__(self, name, hand_size, match_amount, turns, id=None):
+        self.id = id or randomword(5)
         self.player1 = Player(name)
         self.tile_pile = []
         self.discard_pile = []