Here is the latest, I added sound and made some improvements like once the backs are dealt then the hand is dealt on top of them and it waits. Press the space bar and then enter and it deals a new hand. Primitive I know but I think I'm making progress as far as structure etc. So below is the latest code but if you'd like the sounds and graphics as well I started a wiki page and posted the whole thing with sounds and pictures (artwork put together by me) as a zip file with a link at the end of this post. Its pretty small so check it out if you'd like to. I'd appreciate any and all input gang. Talk to you later. Oldnoob
DIM backgroundImage
DIM bgSprite
DIM sound
DIM sound2
DIM card
DIM Backs
DIM Hand
DIM dealhand
DIM deal$
DIM s1,s2,s3,s4,s5
DIM t1,t2,t3,t4,t5
DIM ia, ib, ic, id, ja, jb, jc, jd, ka, kb, kc, kd, la, lb, lc, ld
DIM ma, mb, mc, md, na, nb, nc, nd, oa, ob, oc, od, pa, pb, pc, pd
DIM qa, qb, qc, qd, ra, rb, rc, rd, sa, sb, sc, sd, ta, tb, tc, td, ua, ub, uc, ud, v
'From here up is where everything is declared.
backgroundImage = LoadTexture("Data\\bg\bg.jpg") 'Load the background picture.
bgSprite = NewSprite(backgroundImage)
SprSetPos(320,240)
SprSetSize(640, 480)
SprSetZOrder(3)
WaitTimer (1000)
DrawText() 'From here up prints the background picture to the screen.
sound = LoadSound ("Sounds\shuffle.wav")
sound2 = LoadSound ("Sounds\deal1.wav") 'Load the sounds.
ia = LoadTexture("Data\2s.bmp"):ia = 1:ib = LoadTexture("Data\2c.bmp"):ib = 2:ic = LoadTexture("Data\2h.bmp"):IC = 3:id = LoadTexture("Data\2d.bmp"):ID = 4
ja = LoadTexture("Data\3s.bmp"):ja = 5:jb = LoadTexture("Data\3c.bmp"):jb = 6:jc = LoadTexture("Data\3h.bmp"):jc = 7:jd = LoadTexture("Data\3d.bmp"):jd = 8
ka = LoadTexture("Data\4s.bmp"):ka = 9:kb = LoadTexture("Data\4c.bmp"):kb = 10:kc = LoadTexture("Data\4h.bmp"):kc = 11:kd = LoadTexture("Data\4d.bmp"):kd = 12
la = LoadTexture("Data\5s.bmp"):la = 13:lb = LoadTexture("Data\5c.bmp"):lb = 14:lc = LoadTexture("Data\5h.bmp"):lc = 15:ld = LoadTexture("Data\5d.bmp"):ld = 16
ma = LoadTexture("Data\6s.bmp"):ma = 17:mb = LoadTexture("Data\6c.bmp"):mb = 18:mc = LoadTexture("Data\6h.bmp"):mc = 19:md = LoadTexture("Data\6d.bmp"):md = 20
na = LoadTexture("Data\7s.bmp"):na = 21:nb = LoadTexture("Data\7c.bmp"):nb = 22:nc = LoadTexture("Data\7h.bmp"):nc = 23:nd = LoadTexture("Data\7d.bmp"):nd = 24
oa = LoadTexture("Data\8s.bmp"):oa = 25:ob = LoadTexture("Data\8c.bmp"):ob = 26:oc = LoadTexture("Data\8h.bmp"):oc = 27:od = LoadTexture("Data\

.bmp"):od = 28
pa = LoadTexture("Data\9s.bmp"):pa = 29:pb = LoadTexture("Data\9c.bmp"):pb = 30:pc = LoadTexture("Data\9h.bmp"):pc = 31:pd = LoadTexture("Data\9d.bmp"):pd = 32
qa = LoadTexture("Data\10s.bmp"):qa = 33:qb = LoadTexture("Data\10c.bmp"):qb = 34:qc = LoadTexture("Data\10h.bmp"):qc = 35:qd = LoadTexture("Data\10d.bmp"):qd = 36
ra = LoadTexture("Data\js.bmp"):ra = 37:rb = LoadTexture("Data\jc.bmp"):rb = 38:rc = LoadTexture("Data\jh.bmp"):rc = 39:rd = LoadTexture("Data\jd.bmp"):rd = 40
sa = LoadTexture("Data\qs.bmp"):sa = 41:sb = LoadTexture("Data\qc.bmp"):sb = 42:sc = LoadTexture("Data\qh.bmp"):sc = 43:sd = LoadTexture("Data\qd.bmp"):sd = 44
ta = LoadTexture("Data\ks.bmp"):ta = 45:tb = LoadTexture("Data\kc.bmp"):tb = 46:tc = LoadTexture("Data\kh.bmp"):tc = 47:td = LoadTexture("Data\kd.bmp"):td = 48
ua = LoadTexture("Data\as.bmp"):ua = 49:ub = LoadTexture("Data\ac.bmp"):ub = 50:uc = LoadTexture("Data\ah.bmp"):uc = 51:ud = LoadTexture("Data\ad.bmp"):ud = 52
v = LoadTexture("Data\back.bmp")
'Load all of the card pictures.
SetTexLinearFilter(false) 'Set screen mode.
dealhand: 'This is where gameplay starts.
gosub shuffle
gosub Backs
gosub Hand
locate 5, 20: input deal$
goto dealhand 'This waits for input then starts the whole thing over again.
TextMode(TEXT_BUFFERED) 'This is where gameplay ends.
'SUBROUTINES FROM HERE DOWN.
Backs: 'Print the card backs to the screen and plays the single card sound.
WaitTimer (800)
WaitTimer (500)
s1 = NewSprite(v)
sprSetSize(75, 125)
SprSetPos(165,220)
SprSetZOrder(2)
PlaySound (sound2)
WaitTimer (500)
SprSetZOrder(2)
s2 = NewSprite(v)
sprSetSize(75, 125)
SprSetPos(245,220)
PlaySound (sound2)
WaitTimer (500)
SprSetZOrder(2)
s3 = NewSprite(v)
sprSetSize(75, 125)
SprSetPos(325,220)
PlaySound (sound2)
WaitTimer (500)
SprSetZOrder(2)
s4 = NewSprite(v)
sprSetSize(75, 125)
SprSetPos(405,220)
PlaySound (sound2)
WaitTimer (500)
SprSetZOrder(2)
s5 = NewSprite(v)
sprSetSize(75, 125)
SprSetPos(485,220)
SprSetZOrder(2)
PlaySound (sound2)
WaitTimer (500)
return
WaitTimer (800)
Hand: 'Print the cards to the screen and plays the single card sound.
gosub cards
t1 = NewSprite(card)
sprSetSize(75, 125)
SprSetPos(165,220)
SprSetZOrder(2)
PlaySound (sound2)
WaitTimer (500)
gosub cards
t2 = NewSprite(card)
sprSetSize(75, 125)
SprSetPos(245,220)
SprSetZOrder(2)
PlaySound (sound2)
WaitTimer (500)
gosub cards
t3 = NewSprite(card)
sprSetSize(75, 125)
SprSetPos(325,220)
SprSetZOrder(2)
PlaySound (sound2)
WaitTimer (500)
gosub cards
t4 = NewSprite(card)
sprSetSize(75, 125)
SprSetPos(405,220)
SprSetZOrder(2)
PlaySound (sound2)
WaitTimer (500)
gosub cards
t5 = NewSprite(card)
sprSetSize(75, 125)
SprSetPos(485,220)
SprSetZOrder(2)
PlaySound (sound2)
WaitTimer (500)
return
cards:
card = Rnd() % 52 + 1 'This is the random number generator to choose which card to display.
return
shuffle: 'This plays the shuffle sound.
WaitTimer (1000)
playSound (sound)
WaitTimer (1000)
PlaySound (sound)
return
Here's the link.
basic4gl.wikispaces.com/My+Stuff...