Hey,
I have a class called Greyhounds.
In the variable declarations, I have:
public Random randomizer = new Random();
I know how to use random.next and everything. Here's where the problem is. The greyhounds class has a method Run().
public bool Run()
{
int moveForward = randomizer.Next(4) + 1;
currentLocation = MyPictureBox.Location;
currentLocation.X += moveForward; // .X because currentLocation is of type "Point".
MyPictureBox.Location = currentLocation;
// There's more but it's irrelevant
Anyways, I have four instances of the object. grey1, grey2, grey3, and grey4. The problem comes when I call all of their Run() methods. They all generate the same random number. The code in Run() is supposed to move the pictures across the screen in random intervals, but all of the instances of the object move at the same random interval so they're always collinear. It's as if they're all feeding from the same random number once, changing random numbers, then feeding on that.
So how do I write the method so they don't all go at the same interval?
Thanks,
Zephyr-