still it can be done like that you always keep the number of numbers
between two arrays...
and swap numbers from one to another, that your sure to neve have twice
the same one
yeah...! :]
L
Eduardo Barbosa a écrit :
Hi all!
What I am trying to figure out is this:
How to generate a sequence of random numbers where the newest is always
different from all the previous?
I need to continuosly rewrite an array of 10 random numbers in such a way
that at any given time they are all different.
Let's say that my range is 0 to 100
it starts with random numbers, all different:
{3, 34, 12, 69, 6, 44, 31, 90, 88, 23}
at a set interval some values are replaced by new ones so there are never
two equal numbers, so, after 2 seconds it may look like this:
{3, 66, 12, 79, 6, 44, 10, 81, 88, 23}
Any ideas?
Thanks :)
Eduardo
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3257 (20080710) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders