Making a randomizer...
Because of how the random function works in all programming languages, a computer cannot generate a truly random sequence without being seeded. Let me find something about it for you because you've clearly never heard about this.
Truly Random Numbers (Using Seeds)
The code that he has here:
is what we call seeding. He's seeding the amount of ticks between 1970-something and now. We do this so that no matter what we're doing, our random number is always truly random instead of the "random" numbers always returning the same due to the default seed value as defined by the machine. I personally prefer to use a stopwatch and check for elapsed milliseconds for seeding instead of using "System.DateTime.Now.Ticks" but to each his own, both will return different values because it modifies the algorithm for random values.
Read the entire page as well, it's very useful in higher level programming.
Truly Random Numbers (Using Seeds)
The code that he has here:
Code:
Dim objRandom As New System.Random( _ CType(System.DateTime.Now.Ticks Mod System.Int32.MaxValue, Integer))
Read the entire page as well, it's very useful in higher level programming.
They aren't the same when it first loads thought, I checked and posted an example program which uses the function here.
You need to seed or each time your run it it was always be in the same order/shuffled the same. So, if a user wants to play 2 games let's say the first box is $6,000, next time they play that box will again be $6,000 because it can't uniquely shuffle each time unless you use a seed.
I am confused ):
She doesn't need it to be seeded anyways, especially if she uses my functions.
While Yes, I do admit it will follow a specific pattern, she doesn't need to really worry that much about it, because it's "just" random enough to do the job.
Seeding is only when you truly need a pure random, such in the case of encryption, but this?, no.
While Yes, I do admit it will follow a specific pattern, she doesn't need to really worry that much about it, because it's "just" random enough to do the job.
Seeding is only when you truly need a pure random, such in the case of encryption, but this?, no.

