I have question regarding a solution I am trying to implement. My question is simply will it work. Basically I use the MesenneTwister algorithm to generate 2 pseudo-random numbers, they are then used in two instances of the Random class as the seed.
Code:
MersenneTwister randGen = new MersenneTwister();
mt_r1 = new Random(randGen.Next());
mt_r2 = new Random(randGen.Next());
I then call a function called Randomize that passes in a length of the new random number and a number set 0 - 9. The randomize function has an array that has a length of 12, a for loop fills the array indices using % 2 for even and odd numbers.
Code:
for (int i = 0; i < length; i++)
{
if (i % 2 == 0)
{
ret[i] = characters[mt_r1.Next(characters.Length)];
}
else if (i % 2 == 1)
{
ret[i] = characters[mt_r2.Next(characters.Length)];
}
}
Is this a viable solution? And does it actually aid in randomizing the already random number given from the MersenneTwister algorithm?