Poker-Hand-Evaluator
Poker-Hand-Evaluator copied to clipboard
Wrong Hand Evaluation
First of all, thanks for the create work! I think I found a bug, I replaced the cards in the PokerDemo example and got this:
board: 9s 11c 3c 12c 8h
P1: 9c 5h P2: 12h 4h P3: 14d 13s P4: 14s 13h
Winner: P1
But why? Do I oversee something? Also I noticed that the range (Two Pairs, rank: [200, 300) for example) is usually over 300 (out of range)... I had an example where a two pair lost against a single pair.
Thanks :)
I also got a hand like that. I think the problem lies in EvaluateRankByHighestCards, specifically that excludeCardValue and excludeCardValue2 results in the high pairs not being counted towards the score.
EDIT: I set normalize (a parameter of EvaluateRankByHighestCards) to 10000000 and it appeared to have solved my problem.
Sorry for the delay, I'll check it out.
@jakbrtz sounds interesting! I'll definitely check it and give a full answer to why it happens. @Mkey85 wanted to let you know too.