本文整理汇总了Python中models.Player.bet方法的典型用法代码示例。如果您正苦于以下问题:Python Player.bet方法的具体用法?Python Player.bet怎么用?Python Player.bet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Player
的用法示例。
在下文中一共展示了Player.bet方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup_player_scaffolding
# 需要导入模块: from models import Player [as 别名]
# 或者: from models.Player import bet [as 别名]
def setup_player_scaffolding(self):
player = Player()
player.bet = Decimal(1.00)
player.money = Decimal(1.00)
player.games_played = 4
player.wins = 1
player.win_percentage = 0.0
return player
示例2: setup_dealer_tie_scenario
# 需要导入模块: from models import Player [as 别名]
# 或者: from models.Player import bet [as 别名]
def setup_dealer_tie_scenario(self):
player = Player()
player.bet = Decimal(1.00)
player.money = Decimal(1.00)
card1 = Card('Hearts', 'Jack')
card2 = Card('Hearts', 'King')
dealer_hand = Hand()
player_hand = Hand()
dealer_hand.add_card(card1)
player_hand.add_card(card2)
return player, player_hand, dealer_hand
示例3: setup_dealer_blackjack
# 需要导入模块: from models import Player [as 别名]
# 或者: from models.Player import bet [as 别名]
def setup_dealer_blackjack(self):
player = Player()
player.bet = Decimal(1.00)
player.money = Decimal(1.00)
card1 = Card('Hearts', 'Jack')
card2 = Card('Hearts', 'Ace')
dealer_hand = Hand()
player_hand = Hand()
dealer_hand.add_card(card1)
dealer_hand.add_card(card2)
return player, player_hand, dealer_hand