Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Header.h"
- #include<iostream>
- #include <ctime>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- srand(time(NULL));//sets random to time
- bool Day_is_over = false;
- int DayCounter = 0;
- school s(Size); //calls the school class
- Lunch l(Size/2, Size/2);//calls lunch class
- janitor j; //calls janitor class
- //place the things
- place_me(s, l, Size);
- place_Janitor(s, j, Size);
- while (Day_is_over == false)
- {
- //for (int i = 0;i < 100;++i)
- //{
- s.build(Size, s, l, j);
- if (Collision(l, j, DayCounter))
- {
- Day_is_over = true;
- }
- DayCounter++;
- //}
- }
- cout << "He caught the lunch in " << DayCounter << " days!" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment