I'm building a random number generator and seeding it with two inputs from the user (numberEntry
and integerEntry
). I am also requiring the user to press a button for each new random number. I guess my question is this: will this generate a truly random sequence of numbers? Is there a better, more elegant way to do this? I'm new to C# so go easy on me (and my lowly code).
//kinda, sorta, psuedo-random number Method seeded with user inputs
static double NumberMashUp(double numberEntry, int integerEntry)
{
double pseudoRandom;
Random rnd = new Random();
return numberEntry * (pseudoRandom = rnd.Next(1, integerEntry));
}
Aucun commentaire:
Enregistrer un commentaire