示例#1
0
def calculate_odds_villan(board, exact, num, input_file, hero_cards,
                          villan_cards, verbose, print_elapsed_time):

    # convert a combo object (package poker) to string
    hero_cards = combo_to_hand_str(hero_cards)
    if villan_cards is None:
        villan_cards = ["?", "?"]
    else:
        villan_cards = combo_to_hand_str(villan_cards)

    if (not are_cards_consistent(board, hero_cards, villan_cards)):
        return None

    hole_cards = hero_cards + villan_cards

    args = holdem_argparser.LibArgs(board, exact, num, input_file, hole_cards)
    hole_cards, n, e, board, filename = holdem_argparser.parse_lib_args(args)
    return run(hole_cards, n, e, board, filename, verbose, print_elapsed_time)
示例#2
0
def calculate(board, exact, num, input_file, hole_cards, verbose):
    args = holdem_argparser.LibArgs(board, exact, num, input_file, hole_cards)
    hole_cards, n, e, board, filename = holdem_argparser.parse_lib_args(args)
    return run(hole_cards, n, e, board, filename, verbose)