1
1
This commit is contained in:
@@ -12,7 +12,7 @@ class Hand:
|
||||
""" 向手牌中添加一张牌 """
|
||||
if not isinstance(tile, MahjongTile):
|
||||
raise ValueError("必须添加 MahjongTile 类型的牌")
|
||||
if len(self.tiles) >= 14:
|
||||
if len(self.tiles) > 14:
|
||||
raise ValueError("手牌数量不能超过 14 张")
|
||||
self.tiles.append(tile) # 将牌添加到手牌中
|
||||
self.tile_count[tile] += 1 # 增加牌的数量
|
||||
|
||||
Reference in New Issue
Block a user