worldveil/deuces — pull request #1 by lexelby (2014-09-21 02:04:51+00:00)
Title: add Evaluator.best_hand and refactor

Hi! Thanks for your work on this excellent library! I'm using it to write an odds/outs calculator for the turn and river in hold'em. Your library made that super-easy.

I found that I needed to know the actual best 5-card hand possible (not just its rank), so I added a function for that. FWIW, if I understand SpecialK's algorithm correctly, it wouldn't be able to provide this information for 7-card evaluations :)

I notticed that the code for Evaluator._six and _seven is identical aside from the docstring, so I combined them. I see no reason why this wouldn't work for more than 7 cards (though with significantly diminishing speed).