7 8 9 10 J Poker
Poker hand rankings are used in most of the poker games you play at the casino, such as video poker, Caribbean poker, and pai gow.
We can use a constructor method to initialize the deck of card to contain the right cards.
A poker hand contains 5 cards. Each card has a rank and a suit. The rank of the number cards is set as their face value from 2 (low) to 10 (high), and above them rank the face cards in this order: Jack, Queen, and King. The Ace is the highest card, except when it is used as 1 to complete a straight.
The suits are Diamond (red), Heart (red), Spade (black) and Club (black).
Here are the hands from highest to lowest:
[Straight Flush] Straight Flush
5 cards with consecutive ranks and the same suit. The highest hand in poker is the royal flush: A-K-Q-J-10 of the same suit.
When comparing two straight flushes, the one with the higher high card wins. For example, a hand made up of suited 6-7-8-9-10 will lose over suited 7-8-9-10-J.