![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Hand Crafted
Join Date: Nov 2007
Location: The Pit
Posts: 13
Rep Power: 0
![]() |
Complete Randomization
Currently I'm working on a slot machine project purely for the fun and practice of it, and the fact that it isn't too hard and I'm relatively new still.
I'm using random numbers to determine what combination will result once it stops. However, each time I stop the program then run it again, I notice that it isn't totally random. For example, the first time I run it, the random numbers generated may be 4, 27, 21, 5, etc ... And each corresponds to a certain set of pictures to load. I close it, and the next time I run it, the same random numbers are generated, thus resulting in the same pictures. (It's not always loading 3 picture ones, but always 1, 2, 3 for the first time the pull button is clicked, 2, 2, and 1 the second time, etc.) intChoose = Int((1 - 27 + 1) * Rnd + 27) That's what I'm using to generate the numbers. I thought generating a random numbers which would then generate another different random number would work, but again that does not solve the problem -- only increase possibilities. Is there any way to completely randomize it so that it will choose a different random numbers each time the program is run, or is that a feature specific to VB6 (or most other code) that doesn't allow the programmer to change it? |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pong game complete | teencoder | Show Off Your Open Source Projects | 6 | Aug 9th, 2006 2:27 PM |
| Assembly for complete beginner? | Flavius_Belisarius | Assembly | 17 | May 14th, 2006 2:06 AM |
| complete C++ OS??? | Kilo | C++ | 10 | Dec 6th, 2005 10:03 PM |
| complete newbie question | melee28 | C | 36 | Sep 11th, 2005 6:48 AM |