Пример #1
0
            self.highlight = False


# Run until the user asks to quit
if __name__ == '__main__':
    running = True
    radius = 270
    cards = []
    origin_x = 350
    origin_y = 350

    PLAYERS = 7
    BUY_IN = 1000

    game = Poker(PLAYERS, BUY_IN)
    game.deal()
    game.print_hands()
    game.print_flop()
    game.score_hands()

    flop_paths = []
    for card in game.flop:
        flop_paths.append(card.image_path())

    player_card_paths = []
    for player in game.players:
        hand_paths = []
        for card in player.hand:
            hand_paths.append(card.image_path())
        player_card_paths.append(hand_paths)
Пример #2
0
    print("------------------初始化牌-------------")
    poker = Poker(54)
    poker.detail()
    print("")
    print("------------------洗牌-------------")
    poker.shuffle()
    poker.detail()
    print("")
    print("------------------发牌-------------")

    players = []
    for i in range(3):
        cards = []
        for j in range(17):
            cards.append(poker.deal())

        player = Player(i + 1, cards)
        players.append(player)

    for i in range(3):
        players[i].detail()
    print("")

    print("------------------玩家整理牌后---------")
    for i in range(3):
        players[i].order_cards()
        players[i].detail()
        print("------------------玩家手牌的所有可能组合---------")
        hand_cards = players[i].get_hand_cards()
        hand_groups = HandGroups(hand_cards)