Rem Project: cards
Rem Created: 18/03/2006 09:58:02
Rem ***** Main Source File *****
#constant clubs 1
#constant diamonds 2
#constant hearts 3
#constant spades 4
randomize timer()
jokers = 2
cards=51+jokers
dim deck(cards)
for t=0 to cards
deck(t)=t+1
next t
for t=0 to 400
a=rnd(cards)
b=rnd(cards)
tmp=deck(a)
deck(a) = deck(b)
deck(b) = tmp
next t
x=20
y=20
for t = 0 to cards
if deck(t)>0
value=deck(t)
suit$=" clubs"
ink rgb(255,255,255),0
endif
if deck(t)>13
value=deck(t)-13
suit$=" diamonds"
ink rgb(255,0,0),0
endif
if deck(t)>26
value=deck(t)-26
suit$=" hearts"
ink rgb(255,0,0),0
endif
if deck(t)>39
value=deck(t)-39
suit$=" spades"
ink rgb(255,255,255),0
endif
if deck(t)>52
value=deck(t)-52
suit$="Joker"
ink rgb(0,255,255),0
endif
text x,y,str$(value)+suit$
inc y,20
if y=13*20+20 then inc x,100 : y=20
next t
wait key