# Loic Dachary <*****@*****.**> # # import sys sys.path.insert(0, ".") sys.path.insert(0, ".libs") from pokereval import PokerEval iterations_low = 100000 iterations_high = 200000 pokereval = PokerEval() if pokereval.best_hand_value("hi", ["Ah", "Ad", "As", "Kh", "Ks"]) != 101494784: sys.exit(1) if pokereval.string2card("2h") != 0: sys.exit(1) print "" pockets = [["As", "Ad", "Ac", "Tc", "Ts", "2d", "5c"], ["Js", "Jc", "7s", "8c", "8d", "3c", "3h"], [255, 255]] print "stud7 (1) result = %s\n" % pokereval.winners(game="7stud", pockets=pockets, dead=[], board=[]) pockets = [[22, 18, 21, 3, 41, 1, 30], [39, 255, 255, 15, 13, 17, 255]] print "stud7 (2) result = %s\n" % pokereval.winners(game="7stud", pockets=pockets, dead=[], board=[]) print [j + i + "/%d" % pokereval.string2card(j + i) for i in "hdcs" for j in "23456789TJQKA"] print "deck = %s\n" % pokereval.deck()
# Loic Dachary <*****@*****.**> # # import sys sys.path.insert(0, ".") sys.path.insert(0, ".libs") from pokereval import PokerEval iterations_low = 100000 iterations_high = 200000 pokereval = PokerEval() if pokereval.best_hand_value("hi", ["Ah", "Ad", "As", "Kh", "Ks"]) != 101494784: sys.exit(1) if pokereval.string2card("2h") != 0: sys.exit(1) print "" pockets = [["As", "Ad", "Ac", "Tc", "Ts", "2d", "5c"], ["Js", "Jc", "7s", "8c", "8d", "3c", "3h"], [255, 255]] print "stud7 (1) result = %s\n" % pokereval.winners( game="7stud", pockets=pockets, dead=[], board=[]) pockets = [[22, 18, 21, 3, 41, 1, 30], [39, 255, 255, 15, 13, 17, 255]] print "stud7 (2) result = %s\n" % pokereval.winners( game="7stud", pockets=pockets, dead=[], board=[])