bot.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:Hanabi-AI 作者: MeGotsThis 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号