Guest User

Untitled

a guest
Nov 29th, 2011
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1.  
  2. #include "Header.h"
  3. #include<iostream>
  4. #include <ctime>
  5. #include <cstdlib>
  6. using namespace std;
  7.  
  8.  
  9.  
  10. int main()
  11. {
  12. srand(time(NULL));//sets random to time
  13. bool Day_is_over = false;
  14. int DayCounter = 0;
  15. school s(Size); //calls the school class
  16. Lunch l(Size/2, Size/2);//calls lunch class
  17. janitor j; //calls janitor class
  18.  
  19. //place the things
  20. place_me(s, l, Size);
  21. place_Janitor(s, j, Size);
  22.  
  23. while (Day_is_over == false)
  24. {
  25. //for (int i = 0;i < 100;++i)
  26. //{
  27. s.build(Size, s, l, j);
  28. if (Collision(l, j, DayCounter))
  29. {
  30. Day_is_over = true;
  31. }
  32. DayCounter++;
  33. //}
  34. }
  35.  
  36. cout << "He caught the lunch in " << DayCounter << " days!" << endl;
  37.  
  38. return 0;
  39. }
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment