Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef HEADER_H
- #define HEADER_H
- #include <iostream>
- using namespace std;
- const int MAX = 25;
- const int Size = 10;
- class Lunch;
- class janitor;
- class school
- {
- public:
- school(int gridSize = MAX)//sets grid size to const MAX
- {
- SetSize(getSize());
- clear(School);
- // build(gridSize, School);
- // print(gridSize, School);
- }
- school(); //default constructor
- //friend class Lunch;
- //friend functions allow lunch and janitor to be placed within the school class
- friend void place_me(school & skool, Lunch & lunch, const int Size);
- friend void place_Janitor (school & escuela, janitor & Willie, const int Size);
- friend void random_move(school & skool, Lunch & lunch);
- friend void rand_walk (school & escuela, janitor & Willie);
- void print(const int Size, const char School[MAX][MAX]);
- void clear(char School[MAX][MAX]);
- void build(const int Size, school & skool, Lunch & lunch, janitor & Jan);
- //Get function
- int getSize()const {return Size;}
- //Set function
- void SetSize(const int n);
- private:
- char School[MAX][MAX];
- short ActualSize;
- };
- class Lunch
- {
- public:
- Lunch(int X = -1, int Y = -1);
- // place me and random move output the results for location and random movement to school
- friend void place_me(school & skool, Lunch & lunch, const int Size);
- friend void random_move(school & skool, Lunch & lunch);
- friend bool Collision(Lunch & lunch, janitor & Jan, int & DayCounter);
- private:
- int Xpos, Ypos;
- char LunchRep;
- };
- class janitor
- {
- public:
- janitor (char janchar = 'J')
- {
- jancharacter = janchar;//sets the default janitor characteristics
- bac = .5;
- bruisecount = 0;
- sober = true;
- dead = false;
- m_xval = -1;
- m_yval = -1;
- }
- //places janitor in the school and allows rand-walk to move him within school
- friend void place_Janitor(school & escuela, janitor & Willie, const int Size);
- friend void rand_walk (school & escuela, janitor & Willie);
- friend bool Collision(Lunch & lunch, janitor & Jan, int & DayCounter);
- private:
- float bac;
- int bruisecount;
- int m_xval;
- int m_yval;
- char jancharacter;
- bool sober;
- bool drunk;
- bool dead;
- string jan_name;
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment