You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The flush can not be simply represented with only the max_rank_card. In fact, we need to compare these cards one by one.
In the issue we encountered, the flush was wrongly judged as the same for both G6 and G7, and then went to the 2nd bug (mentioned here), comparing the hole card, which results in G6 as the winner.
How to fix
We have to change how the "score" is represented for FLUSH. It shall contain 5 cards, instead of only 2.
# [Bit flg of hand][rank1(4bit)][rank2(4bit)]
# shall be:
# [Bit flg of hand][rank1(4bit)][rank2(4bit)][rank3(4bit)][rank4(4bit)][rank5(4bit)]
The text was updated successfully, but these errors were encountered:
I know this repo is not maintained, I still post this issue here in case anyone being confused about its behavior.
Issue
Here's what I encountered:
Apparently,
G7
shall win the game, because it has FLUSH with "D7", butSixPlayer
has FLUSH with "D5". The result is wrong.Root cause
See here:
PyPokerEngine/pypokerengine/engine/hand_evaluator.py
Line 70 in a52a048
The flush can not be simply represented with only the
max_rank_card
. In fact, we need to compare these cards one by one.In the issue we encountered, the flush was wrongly judged as the same for both G6 and G7, and then went to the 2nd bug (mentioned here), comparing the hole card, which results in G6 as the winner.
How to fix
We have to change how the "score" is represented for FLUSH. It shall contain 5 cards, instead of only 2.
The text was updated successfully, but these errors were encountered: