當前位置: 首頁>>代碼示例>>Python>>正文


Python Action.new_raise方法代碼示例

本文整理匯總了Python中Action.Action.new_raise方法的典型用法代碼示例。如果您正苦於以下問題:Python Action.new_raise方法的具體用法?Python Action.new_raise怎麽用?Python Action.new_raise使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Action.Action的用法示例。


在下文中一共展示了Action.new_raise方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get_option_action

# 需要導入模塊: from Action import Action [as 別名]
# 或者: from Action.Action import new_raise [as 別名]
 def get_option_action(self, request, game, hand_state):
     """Get Action in request to option request"""
     self.display_hand_state(request, game, hand_state)
     user_selection = self._newUserSelection()
     user_selection.add_option("c",
                               "check",
                               Action.new_check())
     user_selection.add_option("r",
                               "raise {}".format(request.raise_amount),
                               Action.new_raise(request.raise_amount))
     return user_selection.get_user_selection()
開發者ID:von,項目名稱:pyPoker,代碼行數:13,代碼來源:Player.py

示例2: get_call_action

# 需要導入模塊: from Action import Action [as 別名]
# 或者: from Action.Action import new_raise [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()
開發者ID:von,項目名稱:pyPoker,代碼行數:16,代碼來源:Player.py


注:本文中的Action.Action.new_raise方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。