本文整理汇总了Python中deuces.Card.int_to_pretty_str方法的典型用法代码示例。如果您正苦于以下问题:Python Card.int_to_pretty_str方法的具体用法?Python Card.int_to_pretty_str怎么用?Python Card.int_to_pretty_str使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类deuces.Card
的用法示例。
在下文中一共展示了Card.int_to_pretty_str方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: query_state
# 需要导入模块: from deuces import Card [as 别名]
# 或者: from deuces.Card import int_to_pretty_str [as 别名]
def query_state(self):
ret = 'pies = %d, cards = ' % self.pies
for c in self.cards:
ret += Card.int_to_pretty_str(c)
if self.game is None:
ret += ', currently not in-game'
else:
ret += ', ' + self.game.query_state()
return ret
示例2: reveal
# 需要导入模块: from deuces import Card [as 别名]
# 或者: from deuces.Card import int_to_pretty_str [as 别名]
def reveal(self):
msg = "%s's cards are" % self.tag
for c in self.cards:
msg += ' ' + Card.int_to_pretty_str(c)
self.cards = []
if self.game is not None:
self.game.message_players(msg)
else:
return 'Not in game'
return 'Revealed and discarded hand'
示例3: query_state
# 需要导入模块: from deuces import Card [as 别名]
# 或者: from deuces.Card import int_to_pretty_str [as 别名]
def query_state(self):
info = '%s visible cards: ' % self.name
for c in self.visible_cards:
info += Card.int_to_pretty_str(c)
info += ', potpies: %d' % self.potpies
return info