예제 #1
0
 def __init__(self):
     Deck.__init__(self)
     Hand.__init__(self)
     self.playerTop5Cards = {}
     self.game = {}
     self.sortOrder = ['A', 'K', 'Q', 'J', '0', '9', '8', '7', '6', '5', '4', '3', '2']
     self.suits = ['S', 'H', 'D', 'C']
 def __init__(self, cards, name=""):
     Hand.__init__(self, name)
     self.cards = copy.deepcopy(cards)
     self.ranks = [card.get_rank() for card in self.cards]
     self.ranks.sort(reverse=True)
     self.suits = [card.get_suit() for card in self.cards]
     self._compute_rank()
 def __str__(self):
     """
     self, this instance of ThreeCardPokerHand
     Returns a string representation of self that 
     includes the list of the cards, and the rank.
     """
     return Hand.__str__(self) + '\nHand Rank: ' + self.get_full_label()