Re: Repeat Galaxies
Hmm In C/C++ you use the srand and stuff to get random numbers.
Usually the way I do it is to call the time function, put that into the seed, and call up the random number (that method is probably the best for normal uses IMO)
Then you can modulo the number down to whatever size
__________________
When a cat is dropped, it always lands on its feet, and when toast is dropped, it always lands with the buttered side facing down. I propose to strap buttered toast to the back of a cat. The two will hover, spinning inches above the ground. With a giant buttered cat array, a high-speed monorail could easily link New York with Chicago.
|