Advertisement
Guest User

Untitled

a guest
Oct 6th, 2015
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. public bool Run()
  2. {
  3. Point p = PictureBoxDog.Location;
  4.  
  5. while(p.X < 530)
  6. {
  7. int movement = Randomizer.Next(0, 3);
  8. p.X += movement;
  9. PictureBoxDog.Location = p;
  10. }
  11.  
  12. if (Location == 4) //Incomplete section.
  13. return true;
  14. else
  15. return false;
  16. }
  17.  
  18. private void button1_Click(object sender, EventArgs e)
  19. {
  20. Dog dog1 = new Dog(pictureDog1);
  21. Dog dog2 = new Dog(pictureDog2);
  22. Dog dog3 = new Dog(pictureDog3);
  23. Dog dog4 = new Dog(pictureDog4);
  24.  
  25. dog1.Run();
  26. dog2.Run();
  27. dog3.Run();
  28. dog4.Run();
  29. }
  30.  
  31. public bool Run() //Dog1.Run()
  32. {
  33. Point p = PictureBoxDog.Location;
  34.  
  35. int movement = Randomizer.Next(0, 30);
  36. //Location += movement;
  37.  
  38. p.X += movement;
  39. PictureBoxDog.Location = p;
  40.  
  41. if (Location == 4) //Incomplete code.
  42. return true;
  43. else
  44. return false;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement