本文整理匯總了Python中Card.twoStartCards方法的典型用法代碼示例。如果您正苦於以下問題:Python Card.twoStartCards方法的具體用法?Python Card.twoStartCards怎麽用?Python Card.twoStartCards使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Card
的用法示例。
在下文中一共展示了Card.twoStartCards方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: is_row_in_card_filter
# 需要導入模塊: import Card [as 別名]
# 或者: from Card import twoStartCards [as 別名]
def is_row_in_card_filter(self, row):
""" Returns true if the cards of the given row are in the card filter """
#Does work but all cards that should NOT be displayed have to be clicked.
card_filter = self.filters.getCards()
hcs = row[self.colnum['Street0']].split(' ')
if '0x' in hcs: #if cards are unknown return True
return True
gt = row[self.colnum['Game']]
if gt not in ('holdem', 'omahahi', 'omahahilo'): return True
# Holdem: Compare the real start cards to the selected filter (ie. AhKh = AKs)
value1 = Card.card_map[hcs[0][0]]
value2 = Card.card_map[hcs[1][0]]
idx = Card.twoStartCards(value1, hcs[0][1], value2, hcs[1][1])
abbr = Card.twoStartCardString(idx)
return False if card_filter[abbr] == False else True