Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public bool Run()
- {
- Point p = PictureBoxDog.Location;
- while(p.X < 530)
- {
- int movement = Randomizer.Next(0, 3);
- p.X += movement;
- PictureBoxDog.Location = p;
- }
- if (Location == 4) //Incomplete section.
- return true;
- else
- return false;
- }
- private void button1_Click(object sender, EventArgs e)
- {
- Dog dog1 = new Dog(pictureDog1);
- Dog dog2 = new Dog(pictureDog2);
- Dog dog3 = new Dog(pictureDog3);
- Dog dog4 = new Dog(pictureDog4);
- dog1.Run();
- dog2.Run();
- dog3.Run();
- dog4.Run();
- }
- public bool Run() //Dog1.Run()
- {
- Point p = PictureBoxDog.Location;
- int movement = Randomizer.Next(0, 30);
- //Location += movement;
- p.X += movement;
- PictureBoxDog.Location = p;
- if (Location == 4) //Incomplete code.
- return true;
- else
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement