floatinghotpot / casino-server

:fire: An online poker game server powered by Redis, node.js and socket.io
MIT License
1.06k stars 471 forks source link

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 9 years ago

G-h-o-s-t commented 9 years ago

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 commented 7 years ago

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

zilveer commented 7 years ago

any progress on this issue?

cd-slash commented 6 years ago

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 commented 5 years ago

@h3nry0 You are correct it is a split pot here