def updateLocatedCount(self) -> bool:
'''Returns True if played/discarded cards has changed'''
newCount: Dict[Color, List[int]] = {c: [0] * 6 for c in self.colors}
p: Player
c: int
for p in self.game.players:
for c in p.hand:
card = cast(CardKnowledge, self.game.deck[c])
if card.color is not None and card.value is not None:
newCount[card.color][card.value] += 1
if newCount != self.locatedCount:
self.locatedCount = newCount
return True
return False
评论列表
文章目录