Poker-Hand-Evaluator icon indicating copy to clipboard operation
Poker-Hand-Evaluator copied to clipboard

Wrong Hand Evaluation

Open Mkey85 opened this issue 5 years ago • 2 comments

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 :)

Mkey85 avatar Mar 30 '20 21:03 Mkey85

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.

jakbrtz avatar Apr 14 '20 13:04 jakbrtz

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.

danielpaz6 avatar Apr 16 '20 07:04 danielpaz6