game.py 文件源码

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

项目:deep_stack 作者: lyn716 项目源码 文件源码
def get_ones_max_pattern(self, player):
        """ ?????5-7???????? """
        temp_cards = []
        temp_cards.extend(self.public_pot_cards)
        temp_cards.extend(player.hands)
        print('temp_cards: ', temp_cards)

        if len(temp_cards) < 5:
            raise LookupError('Cards < 5')
        all_cards = list(combinations(
            iterable=temp_cards,
            r=5
        ))
        max_cards = all_cards[0]
        for cards in all_cards:
            # 5-7????????python????????
            self.dealer.get(
                five_cards_A=cards,
                five_cards_B=max_cards
            )
            if self.dealer.A_stronger_than_B:
                max_cards = cards
        return max_cards
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号