newbie help

wally

New member
Joined
Oct 14, 2005
Messages
1
Programming Experience
Beginner
Hi im very new to VB.net and im trying to program a card game. the problems im having are: first what is the best way to draw a random card, and second how do i make sure that card is not drawn more than once. Any help would be greatly appreciated.
 
Well u can have following to generate Random index for ur card array
Dim i As Integer
i = (New Random).Next(1, 52) '// Card between 1 and 52
and when you draw a card set a flag to Card object that it is already drawn
so that u can validate it against teh flag
 
Back
Top