was playing some PN1 to get me ready, and I ran up against this hand:

http://i.imgur.com/RZQqRIy.jpg

To recap, Heavy had Qc5c, and the board ran out 4cJs6c7c8c - heavy has a 8-high straight flush, but the computer only awarded him a Q-high flush...

http://i.imgur.com/RZQqRIy.jpg

To recap, Heavy had Qc5c, and the board ran out 4cJs6c7c8c - heavy has a 8-high straight flush, but the computer only awarded him a Q-high flush...

Anyway, noice bug. It's one of those that only a very rare individual can experience. I haven't even seen a straight flush line-up in this game.

For example, if I hold AQ and Max holds A7, and the board runs out A66K3, the computer will sometimes aware the pot to me, despite us holding the exact same hand - AA66K.

What's weird is that this should be the simplest part of the game to program.

There are 21 combinations of cards for each hand. A & B are the hole cards, 1, 2, 3, 4, and 5 are the board cards.

1 2 3 4 5 - Playing the Board

A 1 2 3 4

A 2 3 4 5

A 3 4 5 1

A 4 5 1 2

A 5 1 2 3

B 1 2 3 4

B 2 3 4 5

B 3 4 5 1

B 4 5 1 2

B 5 1 2 3

A B 2 3 4

A B 3 4 5

A B 1 2 3

A B 4 5 1

A B 5 1 2

A B 4 5 2

A B 4 1 2

A B 5 1 3

A B 5 2 3

A B 1 3 5

Just go through all those combinations, searching (in order) for a straight flush. If one straight flush is found, that's your hand, if more than one is found, find out which one is the highest, and that's your hand.

If no straight flush is found, go to quads, then full houses, then flushes, then straights, then trips, then two pair, then pairs, then high cards.

Granted, this is the brute-force method, but I think the dataset is small enough that you can get away with an O(n^2) algorithm here... Omaha's trickier, but even then it should be fine.

AQvsA7- A66K3 board -AQplaysAA66K ||A7playsAA66K. Tie.AQvsA7- A66J3 board -AQplaysAA66Q||A7playsAA66J. Q beats J. AQ wins.