Unwanted repeated set of random numbers

Hello.

I am programming a Yacht game. I am using an array of five elements that will symbolize the five dice, which are, of course, randomized. It does show a different set of numbers in each turn that is randomized, but the same sets keep appearing in the same order of turns every time the program runs. I'm probably not being clear enough, but here's what I mean,

For example, let's say I randomize 3 times the array, having:
5 5 6 6 5
1 4 5 3 1
3 2 4 1 6
... so on. When I stop and run the program again, the same set of numbers above will show. Can anyone explain to me why this happens? Thank you in advance.
their are two things to a random number. One is the seed, if you don't change the seed, the numbers will begin to repeat over time.

There usually two functions associated with random numbers. If you seed against the clock, which is a common practice, you will see the type of changes you expect to see.

I hope this give you some help.
Yeah, I got it to work. I just needed to change the seed, like you said. Thanks for you reply! ;)
Topic archived. No new replies allowed.