Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //My drunk class
- class Drunk
- {
- public:
- //constructor
- //PRE: valid, initilized turf is passed
- //POST: creates a drunk, obviously
- Drunk( Home_Turf&, string, float, coord );
- friend ostream& operator<<( ostream& lhs, Drunk& rhs );
- private:
- string name;
- Home_Turf turf;
- float bac;
- coord location;
- };
- //My constructor
- Drunk::Drunk( Home_Turf& a_turf, string a_name, float a_bac, coord a_location )
- {
- turf = a_turf;
- name = a_name;
- bac = a_bac;
- location = a_location;
- //put us at the starting location (hax)
- turf.world[ location.x ][ location.y ] = BARNEY;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement