Hand rankings (highest to lowest)
- Royal Flush — A K Q J 10 of one suit
- Straight Flush — five sequential same-suit cards
- Four of a Kind — four cards of one rank
- Full House — three of a kind + a pair
- Flush — five same-suit cards (not sequential)
- Straight — five sequential cards (mixed suits); A-2-3-4-5 (the "wheel") counts as a 5-high straight
- Three of a Kind
- Two Pair
- Pair
- High Card
How the evaluator works
For 7-card mode, the program enumerates all C(7,5) = 21 possible 5-card combinations from your input and picks the one with the highest rank. Within a rank, kicker cards are compared in order — so a flush of A-K-Q-J-9 beats a flush of A-K-Q-10-9.
The "wheel" straight (A-2-3-4-5) is detected as a special case, where the ace plays low and the straight is 5-high.
FAQ
Are duplicate cards detected?
Yes — the same card (rank + suit) can't appear twice. If you accidentally pick the Ace of Spades twice, the evaluator shows an error.
Does suit break ties?
No — in standard poker, suits never break ties. If two players make identical 5-card hands, they split the pot.