Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Pick a card - dealer

Author
Message
Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 22nd Oct 2002 22:13
dim suitname$(3)
dim valuname$(13)
dim pack(3,13)

heart=0
club=1
diamond=2
spade=3

suitname$(heart)="H"
suitname$(club)="C"
suitname$(diamond)="D"
suitname$(spade)="S"

A = 1
J = 11
Q = 12
K = 13

valuname$(A) = "A"
valuname$(2) = "2"
valuname$(3) = "3"
valuname$(4) = "4"
valuname$(5) = "5"
valuname$(6) = "6"
valuname$(7) = "7"
valuname$(8) = "8"
valuname$(9) = "9"
valuname$(10) = "10"
valuname$(J) = "J"
valuname$(Q) = "Q"
valuname$(K) = "K"


dim cards(52,1)

sync rate 80
sync on

`SHUFFLE
randomize timer()

for i = 1 to 52

tryagain:

suit = rnd(3)
value = rnd(12)+1

if pack(suit,value)=0
cards(i,0)= suit
cards(i,1)= value
pack(suit,value)=1
else
goto tryagain
endif

next i


d=18

DO
cls

for i = 1 to 26

set cursor 0,(i*d)-d

print suitname$(cards(i,0))+" "+valuname$(cards(i,1))

set cursor 100,(i*d)-d

print suitname$(cards(i+26,0))+" "+valuname$(cards(i+26,1))

next i


sync
LOOP
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 9th Jan 2003 00:26
There:


by the way nice code

WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE
Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 26th Jan 2003 17:56
thanks

Login to post a reply

Server time is: 2024-04-24 19:03:28
Your offset time is: 2024-04-24 19:03:28