Card games...

Blitz3D Forums/Blitz3D Beginners Area/Card games...

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

First, a full deck without jokers is 52, not 50.

The only way to do this that I can think of is make an array of 52, and when a card is chose, 9 of clubs for instance, take its respective variable, cards(9) and change it to True, ie. 1. So just do random, and say If cards(rand(0,52))=0 then...
and so on.

SeedRnd Millisecs()

Dim cards(52)

Repeat
   card=Rand(1,52)
   If cards(card)=0 then
       cards(card)=1
       playgame(card)
   End if
Until gameover=True
End


Hope it helps!