本文整理汇总了Python中Action.Action.new_blind方法的典型用法代码示例。如果您正苦于以下问题:Python Action.new_blind方法的具体用法?Python Action.new_blind怎么用?Python Action.new_blind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Action.Action
的用法示例。
在下文中一共展示了Action.new_blind方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: blinds
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import new_blind [as 别名]
def blinds(self, hand_state):
"""Handle blinds."""
# XXX What if # blinds < # players?
blinds = self.structure.get_blinds()
betting = hand_state.get_current_betting_round()
for blind in blinds:
player = betting.get_action_player()
if player.stack < blind:
action = Action.new_blind(player.stack,
all_in=True)
else:
action = Action.new_blind(blind)
betting.process_action(action)
self.report_action(player, action)
示例2: get_blind_action
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import new_blind [as 别名]
def get_blind_action(self, request, game, hand_state):
"""Get Action in response to blind request"""
return Action.new_blind(min(request.amount, self.stack),
all_in = request.amount >= self.stack)