Explorar el Código

Allow manual control of game id

Pjotir hace 10 meses
padre
commit
7d25d25b24
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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 = []