|
-
Oct 30th, 2009, 06:48 PM
#6
Re: Problem with non-repeating random numbers
 Originally Posted by ekeak
ty, but I want the user to click a button for the next hand.
No problem. Use the first option. Create a list and assign it to a member, i.e. class-level, variable. Each time the user clicks the button you get an item randomly from the list and remove it so that it can't be selected again. Just make sure that your Random object is assigned to a member variable too, so you use the same one all the time and don't create a new one each time you want to make a selection.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|