Esempio n. 1
0
 def three_2s_AK(self):
     return PokerHand([
         PlayingCard(Suit.Spades, FaceValue.Tre),
         PlayingCard(Suit.Diamonds, FaceValue.Tre),
         PlayingCard(Suit.Clubs, FaceValue.Tre),
         PlayingCard(Suit.Spades, FaceValue.Ace),
         PlayingCard(Suit.Hearts, FaceValue.King)
     ])
Esempio n. 2
0
 def aces_2s_K(self):
     return PokerHand([
         PlayingCard(Suit.Spades, FaceValue.Ace),
         PlayingCard(Suit.Diamonds, FaceValue.Ace),
         PlayingCard(Suit.Spades, FaceValue.Deuce),
         PlayingCard(Suit.Diamonds, FaceValue.Deuce),
         PlayingCard(Suit.Spades, FaceValue.King)
     ])
Esempio n. 3
0
 def flush_h_KQJ98(self):
     return PokerHand([
         PlayingCard(Suit.Hearts, FaceValue.King),
         PlayingCard(Suit.Hearts, FaceValue.Queen),
         PlayingCard(Suit.Hearts, FaceValue.Jack),
         PlayingCard(Suit.Hearts, FaceValue.Nine),
         PlayingCard(Suit.Hearts, FaceValue.Eight)
     ])
Esempio n. 4
0
 def flush_s_A7532(self):
     return PokerHand([
         PlayingCard(Suit.Spades, FaceValue.Ace),
         PlayingCard(Suit.Spades, FaceValue.Seven),
         PlayingCard(Suit.Spades, FaceValue.Five),
         PlayingCard(Suit.Spades, FaceValue.Tre),
         PlayingCard(Suit.Spades, FaceValue.Deuce)
     ])
Esempio n. 5
0
 def ace_high_straight(self):
     return PokerHand([
         PlayingCard(Suit.Diamonds, FaceValue.Ace),
         PlayingCard(Suit.Hearts, FaceValue.King),
         PlayingCard(Suit.Hearts, FaceValue.Queen),
         PlayingCard(Suit.Hearts, FaceValue.Jack),
         PlayingCard(Suit.Hearts, FaceValue.Ten)
     ])
Esempio n. 6
0
 def six_high_straight2(self):
     return PokerHand([
         PlayingCard(Suit.Clubs, FaceValue.Six),
         PlayingCard(Suit.Hearts, FaceValue.Five),
         PlayingCard(Suit.Spades, FaceValue.Four),
         PlayingCard(Suit.Hearts, FaceValue.Tre),
         PlayingCard(Suit.Hearts, FaceValue.Deuce)
     ])
Esempio n. 7
0
 def sevens_full_of_aces(self):
     return PokerHand([
         PlayingCard(Suit.Spades, FaceValue.Seven),
         PlayingCard(Suit.Diamonds, FaceValue.Seven),
         PlayingCard(Suit.Clubs, FaceValue.Seven),
         PlayingCard(Suit.Clubs, FaceValue.Ace),
         PlayingCard(Suit.Diamonds, FaceValue.Ace)
     ])
Esempio n. 8
0
 def eights_full_of_2s(self):
     return PokerHand([
         PlayingCard(Suit.Spades, FaceValue.Eight),
         PlayingCard(Suit.Diamonds, FaceValue.Eight),
         PlayingCard(Suit.Clubs, FaceValue.Eight),
         PlayingCard(Suit.Spades, FaceValue.Deuce),
         PlayingCard(Suit.Diamonds, FaceValue.Deuce)
     ])
Esempio n. 9
0
 def four_4s_9(self):
     return PokerHand([
         PlayingCard(Suit.Spades, FaceValue.Four),
         PlayingCard(Suit.Diamonds, FaceValue.Four),
         PlayingCard(Suit.Clubs, FaceValue.Four),
         PlayingCard(Suit.Hearts, FaceValue.Four),
         PlayingCard(Suit.Spades, FaceValue.Nine)
     ])
Esempio n. 10
0
 def four_8s_3(self):
     return PokerHand([
         PlayingCard(Suit.Spades, FaceValue.Eight),
         PlayingCard(Suit.Diamonds, FaceValue.Eight),
         PlayingCard(Suit.Clubs, FaceValue.Eight),
         PlayingCard(Suit.Hearts, FaceValue.Eight),
         PlayingCard(Suit.Diamonds, FaceValue.Tre)
     ])
Esempio n. 11
0
 def king_high_straight_flush(self):
     return PokerHand([
         PlayingCard(Suit.Diamonds, FaceValue.King),
         PlayingCard(Suit.Diamonds, FaceValue.Queen),
         PlayingCard(Suit.Diamonds, FaceValue.Jack),
         PlayingCard(Suit.Diamonds, FaceValue.Ten),
         PlayingCard(Suit.Diamonds, FaceValue.Nine)
     ])
Esempio n. 12
0
 def Ks_Qs_J(self):
     return PokerHand([
         PlayingCard(Suit.Diamonds, FaceValue.King),
         PlayingCard(Suit.Clubs, FaceValue.King),
         PlayingCard(Suit.Spades, FaceValue.Queen),
         PlayingCard(Suit.Diamonds, FaceValue.Queen),
         PlayingCard(Suit.Spades, FaceValue.Jack)
     ])
Esempio n. 13
0
 def tens_9s_8(self):
     return PokerHand([
         PlayingCard(Suit.Spades, FaceValue.Ten),
         PlayingCard(Suit.Diamonds, FaceValue.Ten),
         PlayingCard(Suit.Spades, FaceValue.Nine),
         PlayingCard(Suit.Diamonds, FaceValue.Nine),
         PlayingCard(Suit.Spades, FaceValue.Eight)
     ])
Esempio n. 14
0
 def royal_flush_hearts(self):
     return PokerHand([
         PlayingCard(Suit.Hearts, FaceValue.Ace),
         PlayingCard(Suit.Hearts, FaceValue.King),
         PlayingCard(Suit.Hearts, FaceValue.Queen),
         PlayingCard(Suit.Hearts, FaceValue.Jack),
         PlayingCard(Suit.Hearts, FaceValue.Ten)
     ])
Esempio n. 15
0
 def tens_9s_8v2(self):
     return PokerHand([
         PlayingCard(Suit.Clubs, FaceValue.Ten),
         PlayingCard(Suit.Hearts, FaceValue.Ten),
         PlayingCard(Suit.Clubs, FaceValue.Nine),
         PlayingCard(Suit.Hearts, FaceValue.Nine),
         PlayingCard(Suit.Diamonds, FaceValue.Eight)
     ])
Esempio n. 16
0
 def ace_K_Q_J_8v2(self):
     return PokerHand([
         PlayingCard(Suit.Clubs, FaceValue.Ace),
         PlayingCard(Suit.Hearts, FaceValue.King),
         PlayingCard(Suit.Clubs, FaceValue.Queen),
         PlayingCard(Suit.Clubs, FaceValue.Jack),
         PlayingCard(Suit.Clubs, FaceValue.Eight)
     ])
Esempio n. 17
0
 def seven_5_4_3_2(self):
     return PokerHand([
         PlayingCard(Suit.Spades, FaceValue.Seven),
         PlayingCard(Suit.Spades, FaceValue.Five),
         PlayingCard(Suit.Diamonds, FaceValue.Four),
         PlayingCard(Suit.Spades, FaceValue.Tre),
         PlayingCard(Suit.Spades, FaceValue.Deuce)
     ])
Esempio n. 18
0
 def ace_k_q_j_9(self):
     return PokerHand([
         PlayingCard(Suit.Spades, FaceValue.Ace),
         PlayingCard(Suit.Diamonds, FaceValue.King),
         PlayingCard(Suit.Spades, FaceValue.Queen),
         PlayingCard(Suit.Spades, FaceValue.Jack),
         PlayingCard(Suit.Spades, FaceValue.Nine)
     ])
Esempio n. 19
0
 def ace_K_Q_J_8(self):
     return PokerHand([
         PlayingCard(Suit.Diamonds, FaceValue.Ace),
         PlayingCard(Suit.Spades, FaceValue.King),
         PlayingCard(Suit.Diamonds, FaceValue.Queen),
         PlayingCard(Suit.Diamonds, FaceValue.Jack),
         PlayingCard(Suit.Spades, FaceValue.Eight)
     ])
Esempio n. 20
0
 def fives_J_9_6(self):
     return PokerHand([
         PlayingCard(Suit.Spades, FaceValue.Five),
         PlayingCard(Suit.Diamonds, FaceValue.Five),
         PlayingCard(Suit.Diamonds, FaceValue.Jack),
         PlayingCard(Suit.Spades, FaceValue.Nine),
         PlayingCard(Suit.Diamonds, FaceValue.Six)
     ])
Esempio n. 21
0
 def twos_K_Q_J(self):
     return PokerHand([
         PlayingCard(Suit.Clubs, FaceValue.Deuce),
         PlayingCard(Suit.Hearts, FaceValue.Deuce),
         PlayingCard(Suit.Clubs, FaceValue.King),
         PlayingCard(Suit.Diamonds, FaceValue.Queen),
         PlayingCard(Suit.Hearts, FaceValue.Jack)
     ])
Esempio n. 22
0
 def tens_8_7_6(self):
     return PokerHand([
         PlayingCard(Suit.Clubs, FaceValue.Ten),
         PlayingCard(Suit.Hearts, FaceValue.Ten),
         PlayingCard(Suit.Spades, FaceValue.Eight),
         PlayingCard(Suit.Spades, FaceValue.Seven),
         PlayingCard(Suit.Spades, FaceValue.Six)
     ])
Esempio n. 23
0
 def fives_J_9_6v2(self):
     return PokerHand([
         PlayingCard(Suit.Clubs, FaceValue.Five),
         PlayingCard(Suit.Hearts, FaceValue.Five),
         PlayingCard(Suit.Clubs, FaceValue.Jack),
         PlayingCard(Suit.Diamonds, FaceValue.Nine),
         PlayingCard(Suit.Clubs, FaceValue.Six)
     ])
Esempio n. 24
0
 def tens_K_3_2(self):
     return PokerHand([
         PlayingCard(Suit.Spades, FaceValue.Ten),
         PlayingCard(Suit.Diamonds, FaceValue.Ten),
         PlayingCard(Suit.Diamonds, FaceValue.King),
         PlayingCard(Suit.Diamonds, FaceValue.Tre),
         PlayingCard(Suit.Diamonds, FaceValue.Deuce)
     ])
Esempio n. 25
0
 def aces_4_3_2(self):
     return PokerHand([
         PlayingCard(Suit.Clubs, FaceValue.Ace),
         PlayingCard(Suit.Hearts, FaceValue.Ace),
         PlayingCard(Suit.Spades, FaceValue.Four),
         PlayingCard(Suit.Spades, FaceValue.Tre),
         PlayingCard(Suit.Spades, FaceValue.Deuce)
     ])
Esempio n. 26
0
 def fours_3s_K(self):
     return PokerHand([
         PlayingCard(Suit.Spades, FaceValue.Four),
         PlayingCard(Suit.Diamonds, FaceValue.Four),
         PlayingCard(Suit.Diamonds, FaceValue.Tre),
         PlayingCard(Suit.Clubs, FaceValue.Tre),
         PlayingCard(Suit.Hearts, FaceValue.King)
     ])
Esempio n. 27
0
 def cards(self):
     if Deck._cards is None:
         Deck._cards = []
         for face_value in FaceValue:
             for suit in Suit:
                 Deck._cards.append(PlayingCard(suit, face_value))
     return Deck._cards
Esempio n. 28
0
 def loaddeck(self):
     deck = [
         PlayingCard('ace', 'club', '1/11'),
         PlayingCard('ace', 'diamond', '1/11'),
         PlayingCard('ace', 'heart', '1/11'),
         PlayingCard('ace', 'spade', '1/11'),
         PlayingCard('two', 'club', 2),
         PlayingCard('two', 'diamond', 2),
         PlayingCard('two', 'heart', 2),
         PlayingCard('two', 'spade', 2),
         PlayingCard('three', 'club', 3),
         PlayingCard('hree', 'diamond', 3),
         PlayingCard('three', 'heart', 3),
         PlayingCard('three', 'spade', 3),
         PlayingCard('four', 'club', 4),
         PlayingCard('four', 'diamond', 4),
         PlayingCard('four', 'heart', 4),
         PlayingCard('two', 'spade', 4),
         PlayingCard('five', 'club', 5),
         PlayingCard('five', 'diamond', 5),
         PlayingCard('five', 'heart', 5),
         PlayingCard('five', 'spade', 5),
         PlayingCard('six', 'club', 6),
         PlayingCard('six', 'diamond', 6),
         PlayingCard('six', 'heart', 6),
         PlayingCard('six', 'spade', 6),
         PlayingCard('seven', 'club', 7),
         PlayingCard('seven', 'diamond', 7),
         PlayingCard('seven', 'heart', 7),
         PlayingCard('seven', 'spade', 2),
         PlayingCard('eight', 'club', 8),
         PlayingCard('eight', 'diamond', 8),
         PlayingCard('eight', 'heart', 8),
         PlayingCard('eight', 'spade', 8),
         PlayingCard('nine', 'club', 9),
         PlayingCard('nine', 'diamond', 9),
         PlayingCard('nine', 'heart', 9),
         PlayingCard('nine', 'spade', 9),
         PlayingCard('ten', 'club', 10),
         PlayingCard('ten', 'diamond', 10),
         PlayingCard('ten', 'heart', 10),
         PlayingCard('ten', 'spade', 10),
         PlayingCard('jack', 'club', 10),
         PlayingCard('jack', 'diamond', 10),
         PlayingCard('jack', 'heart', 10),
         PlayingCard('jack', 'spade', 10),
         PlayingCard('queen', 'club', 10),
         PlayingCard('queen', 'diamond', 10),
         PlayingCard('queen', 'heart', 10),
         PlayingCard('queen', 'spade', 10),
         PlayingCard('king', 'club', 10),
         PlayingCard('king', 'diamond', 10),
         PlayingCard('king', 'heart', 10),
         PlayingCard('king', 'spade', 10)
     ]
     return deck
Esempio n. 29
0
 def __create_deck_(self):
     return_deck = []
     for s in self._suits:
         for c in self._card:
             return_deck.append(PlayingCard(s, c))
     return return_deck
Esempio n. 30
0
 def __init__(self, n, s, str_image_on, parent):
     PlayingCard.__init__(self, n, str_image_on, parent)
     self.__suit = s
     self.rank = n
     if n > 10:
         self.set_point(n - 9.5)