소스 검색

Allow manual control of game id

Pjotir 10 달 전
부모
커밋
7d25d25b24
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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 = []