BEGIN
INIT cardval = ['Ace',2,3,4,5,6,7,8,9,10,'Jack','Queen','King']
INIT suits = ['Clubs','Diamonds','Hearts','Spades']
INIT dealt = []
DO
SET c1 = random_int(0,51)
WHILE (ci in dealt)
SET dealt = dealt + c1
CALCULATE c1suit = suits[c1 DIV 13]
CALCULATE c1value = cardval[c1 MOD 13]
DO
SET c2 = random_int(0,51)
WHILE (c2 in dealt)
SET dealt = dealt + c2
CALCULATE c2suit = suits[c2 DIV 13]
CALCULATE c2value = cardval[c2 MOD 13]
DISPLAY c1, c2 as images
DISPLAY c1 value and suit, c2 value and suit
IF C1 = C2 THEN
OUTPUT 'Draw'
ELSEIF CI > C2 THEN
OUTPUT 'Card1 wins'
ELSE
OUTPUT 'Card2 wins'
ENDIF
END