Poker Hands (worst to best): ♣️♠️♦️♥️ 10. High Card (Highest value card in Max.) 9. Pair (Two cards of the same value) 8. Double Pair (Two Pairs) 7. Three-of-a-kind (Three cards of the same value) 6. Straight (All cards in ascending / descending order) 5. Flush (All cards with the same suit) 4. Full House (One pair and one three-of-a-kind) 3. Four-of-a-kind (Four cards of the same value) 2. Straight Flush (A flush and a straight) 1. Royal Flush (A straight flush that goes from T to A)
Comment any bugs! Feel free to test different hands by going inside, changing the values and running the “Evaluate Hand” broadcast For each number in the deck, the calculations to get its suit and integer value are: SUIT: floor(n/13) INTEGER VALUE: mod(n, 13); if n==0 => n=13 (note: A is represented as 1 in the integer value code, but only changed at 14 in straights) The poker hand detector was optimized for 334 blocks https://scratch.mit.edu/projects/1385280264