Lets assume that I have a lottery site in which 10 people are entered and inserted into an array. Of course it is a highly sensitive task to randomly shuffle the array of 10 people and pick one random winner.
I intend to use the shuffle function to randomly pick the winner out of the array. Is this a good way to do it since the lottery is of course sensitive and needs to be 100% random and not Reversible (for the candidate to try and trick).
If I am going about it the right way, what techniques/code could I add to further randomize the array and make it 100% more bullet proof. It just feels incorrect that I can run just one function and essentially be done.
Any guidance please?
Aucun commentaire:
Enregistrer un commentaire