har har

J

John Hunter

# my python wrapping of pokereval -- results are exact

from pokereval import seven_cards, compare_two_hands

p0 = ('Ac', 'Tc')
p1 = ('Ah', '3h')
common = ('8c', '6h', '7h')
wins, losses, ties, ev = compare_two_hands( p0, p1, common)
assert( wins==517 and losses==439 and ties==34)

p0 = ('Qd', 'Kd')
p1 = ('Ac', '3s')
common = ('Kc', 'Jc', '4c')
wins, losses, ties, ev = compare_two_hands( p0, p1, common)
wins, losses, ties, ev = compare_two_hands( p0, p1, common)
assert( wins==537 and losses==453 and ties==0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Random in java 9
memory leak - C API 0
Beginner Question--rand( ) 23
Can you help me find my memory leak? 4
Sizewell B++ 0
Rods 0
Lowering Of Graphite Rods Into Reactor Core 1

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,933
Members
47,472
Latest member
blackwatermelon

Latest Threads

Top