Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi-card calculation wrong in case of pair in shared cards, and no combinations in both players :( #13

Open
G-h-o-s-t opened this issue Jul 4, 2015 · 4 comments

Comments

@G-h-o-s-t
Copy link

POKER:
Example:
Shared cards: A J 3 Q 3 (30, 27, 51, 44, 67)
player1 cards: 8 5 (72, 37)
player2 cards: 8 2 (56, 34)

player 2 win with message (rank): "one pair". It's wrong. See screenshot.
I think, the payer 1 must win with: highcard.

screen shot 2015-07-04 at 16 13 39

Also, i think, i'm found missing code for Holdem.sort function, then we need check last pair for double.
need to add at bottom of if block:
else if (d3 === 0) {
// ABCXX -> XXABC
for(var i=0; i<3; i++) cards.push( cards.shift() );
} else {
// ABCDE
}

@buzai
Copy link

buzai commented Feb 22, 2017

i click games ,but i cant see any games ,can u help me

@zilveer
Copy link

zilveer commented Jul 24, 2017

any progress on this issue?

@cd-slash
Copy link

cd-slash commented Oct 7, 2018

You have correctly identified that the hand evaluation is wrong, but it should be a split pot - not a win for player 1 as you suggested.

Both players share the winning hand (AQJ33) - the 85 and 83 are both irrelevant because the best 5 card hand is comprised solely of the shared cards.

@zilveer
Copy link

zilveer commented Jan 8, 2019

@h3nry0
You are correct it is a split pot here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants