本文整理汇总了Python中Action.Action.new_call方法的典型用法代码示例。如果您正苦于以下问题:Python Action.new_call方法的具体用法?Python Action.new_call怎么用?Python Action.new_call使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Action.Action
的用法示例。
在下文中一共展示了Action.new_call方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_call_action
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import new_call [as 别名]
def get_call_action(self, request, game, hand_state):
"""Get Action in response to call request"""
self.display_hand_state(request, game, hand_state)
user_selection = self._newUserSelection()
user_selection.add_option("c",
"call {}".format(request.amount),
Action.new_call(request.amount))
user_selection.add_option("f", "fold", Action.new_fold())
if request.raise_amount != None:
user_selection.add_option(\
"r",
"raise to {}".format(request.raise_amount),
Action.new_raise(request.raise_amount))
return user_selection.get_user_selection()