本文整理汇总了Python中Deck.construct_standard_deck方法的典型用法代码示例。如果您正苦于以下问题:Python Deck.construct_standard_deck方法的具体用法?Python Deck.construct_standard_deck怎么用?Python Deck.construct_standard_deck使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Deck
的用法示例。
在下文中一共展示了Deck.construct_standard_deck方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: deck_entropy
# 需要导入模块: import Deck [as 别名]
# 或者: from Deck import construct_standard_deck [as 别名]
def deck_entropy(deck_1, deck_2 = Deck.construct_standard_deck()):
total=0
for i, card in enumerate(deck_1):
diff = 0
for j, compare in enumerate(deck_2):
if(card==compare):
diff == i-j
if(diff<0):
diff*=(-1)
total+=diff
return total
示例2: _debug
# 需要导入模块: import Deck [as 别名]
# 或者: from Deck import construct_standard_deck [as 别名]
def _debug():
deck = Deck.construct_standard_deck()
print deck
mapped_deck = generate_map(deck )
print mapped_deck