本文整理汇总了Python中card.Card.shuffle方法的典型用法代码示例。如果您正苦于以下问题:Python Card.shuffle方法的具体用法?Python Card.shuffle怎么用?Python Card.shuffle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类card.Card
的用法示例。
在下文中一共展示了Card.shuffle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: slap
# 需要导入模块: from card import Card [as 别名]
# 或者: from card.Card import shuffle [as 别名]
slap()
if z == 1:
break
if z == 0:
playernum = playernum + tablenum
tablenum = 0
print("You took the cards.")
print("You have %s cards; your opponent has %s cards." % (playernum, dealernum))
del table[:]
del tablenumbers[:]
tablenumbers.append(-1)
tablenumbers.append(-2)
tablenumbers.append(-3)
slap()
playercard.shuffle()
while playercard.numbervalue > 10 or playercard.numbervalue == 1:
playercard.shuffle()
table.append(playercard.value)
tablenumbers.append(playercard.numbervalue)
playernum = playernum - 1
tablenum = tablenum + 1
print("You: "+table[-1])
playerspecial()
slap()
dealercard.shuffle()
while dealercard.numbervalue > 10 or dealercard.numbervalue == 1:
dealercard.shuffle()
table.append(dealercard.value)
tablenumbers.append(dealercard.numbervalue)