Esempio n. 1
0
    def __init__(self, cards):

        self.cards = cards
        self.sort()
        self.labels, self.labels_list, self.suits, self.suits_list = self.hand_values(
        )
        self.hand_info = {
            'label_count': self.labels,
            'labels': self.labels_list,
            'suit_count': self.suits,
            'suits': self.suits_list
        }

        self.game_raw = higher_from_cards(self.hand_info, self.cards)
        self.game_value = self.game_raw[2]
        self.game_cards_raw = self.game_raw[1]
        self.game_cards = [str(card) for card in self.game_raw[1]]
        self.game_name = get_game_name(self.game_raw[2])
        self.game = self.mount_game()

        self.game_labels, self.game_labels_list, self.game_suits, self.game_suits_list = self.hand_values(
            self.game_cards_raw)
        self.game_info = {
            'label_count': self.game_labels,
            'labels': self.game_labels_list,
            'suit_count': self.game_suits,
            'suits': self.game_suits
        }
Esempio n. 2
0
 def mock_royal():
     return [[
         card('10', 'Spades', 8),
         card('J', 'Spades', 9),
         card('Q', 'Spades', 10),
         card('K', 'Spades', 11),
         card('A', 'Spades', 12),
     ], 10,
             get_game_name(10)]
Esempio n. 3
0
 def mock_street():
     return [[
         card('2', 'Spades', 0),
         card('3', 'Spades', 1),
         card('4', 'Spades', 2),
         card('5', 'Spades', 3),
         card('6', 'Spades', 4),
     ], 9,
             get_game_name(9)]
Esempio n. 4
0
 def mock_four():
     return [[
         card('2', 'Spades', 0),
         card('2', 'Clubs', 0),
         card('2', 'Diamonds', 0),
         card('2', 'Hearts', 0),
         card('3', 'Spades', 1),
     ], 8,
             get_game_name(8)]
Esempio n. 5
0
 def mock_highcard():
     return [[
         card('A', 'Hearts', 14),
         card('2', 'Spades', 0),
         card('3', 'Spades', 1),
         card('4', 'Spades', 2),
         card('5', 'Spades', 3),
     ], 1,
             get_game_name(1)]
Esempio n. 6
0
 def mock_fullhouse():
     return [[
         card('2', 'Spades', 0),
         card('2', 'Clubs', 0),
         card('3', 'Clubs', 1),
         card('3', 'Spades', 1),
         card('3', 'Hearts', 1),
     ], 7,
             get_game_name(7)]
Esempio n. 7
0
 def mock_flush():
     return [[
         card('2', 'Spades', 0),
         card('3', 'Spades', 1),
         card('4', 'Spades', 2),
         card('5', 'Spades', 3),
         card('A', 'Spades', 14),
     ], 6,
             get_game_name(6)]
Esempio n. 8
0
 def mock_straight():
     return [[
         card('2', 'Spades', 0),
         card('3', 'Spades', 1),
         card('4', 'Spades', 2),
         card('5', 'Clubs', 3),
         card('6', 'Spades', 4),
     ], 5,
             get_game_name(5)]
Esempio n. 9
0
 def mock_three():
     return [[
         card('2', 'Spades', 0),
         card('2', 'Clubs', 0),
         card('2', 'Hearts', 0),
         card('3', 'Spades', 1),
         card('4', 'Spades', 2),
     ], 4,
             get_game_name(4)]
Esempio n. 10
0
 def mock_twopairs():
     return [[
         card('2', 'Spades', 0),
         card('2', 'Clubs', 0),
         card('3', 'Spades', 1),
         card('3', 'Clubs', 1),
         card('4', 'Spades', 2),
     ], 3,
             get_game_name(3)]
Esempio n. 11
0
 def mock_pair():
     return [[
         card('2', 'Spades', 0),
         card('2', 'Clubs', 0),
         card('3', 'Spades', 1),
         card('4', 'Spades', 2),
         card('5', 'Spades', 3),
     ], 2,
             get_game_name(2)]