pokerhands.frink

View or download pokerhands.frink in plain text format


// Enumerate all 5-card poker hands in lexicographical order.

cards = new array
multifor card = [["2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A"], ["D", "C", "H", "S"]]
   cards.push[card]

for hand = cards.combinations[5]
   println[hand]




View or download pokerhands.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 17386 days, 21 hours, 32 minutes ago.