Esempio n. 1
0
def pokereval_results(num_cards=7, print_to_screen=False):
    pe = pokereval.PokerEval()
    to_str = lambda c: c.__str__()
    for i in xrange(number_of_runs):
        cards = random.sample(deck, num_cards)
        hand = cards[0:2]
        # hand = [Card(14,1), Card(14,2)]
        board = cards[2:num_cards]
        
        he_result = HandEvaluator.evaluate_hand(hand, board)
        pe_result = _pokereval_evaluate_hand_bm(hand, board, 1000)
        
        pe_win_pct = pe_result['eval'][0]['winhi'] / float(pe_result['info'][0])
        pe_ev = pe_result['eval'][0]['ev']
Esempio n. 2
0
def pokereval_results(num_cards=7, print_to_screen=False):
    pe = pokereval.PokerEval()
    to_str = lambda c: c.__str__()
    for i in xrange(number_of_runs):
        cards = random.sample(deck, num_cards)
        hand = cards[0:2]
        # hand = [Card(14,1), Card(14,2)]
        board = cards[2:num_cards]

        he_result = HandEvaluator.evaluate_hand(hand, board)
        pe_result = _pokereval_evaluate_hand_bm(hand, board, 1000)

        pe_win_pct = pe_result['eval'][0]['winhi'] / float(
            pe_result['info'][0])
        pe_ev = pe_result['eval'][0]['ev']
Esempio n. 3
0
def handevaluator_5_bm():
    for i in xrange(number_of_runs):
        cards = random.sample(deck, 5)
        hand = cards[0:2]
        board = cards[2:5]
        HandEvaluator.evaluate_hand(hand, board)
Esempio n. 4
0
def handevaluator_5_bm():
    for i in xrange(number_of_runs):
        cards = random.sample(deck, 5)
        hand = cards[0:2]
        board = cards[2:5]
        HandEvaluator.evaluate_hand(hand, board)