diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/creature.hpp | 2 | ||||
-rw-r--r-- | inc/location.hpp | 2 | ||||
-rw-r--r-- | inc/resource.hpp | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/inc/creature.hpp b/inc/creature.hpp index 90b0b17..7c5c8cb 100644 --- a/inc/creature.hpp +++ b/inc/creature.hpp @@ -8,7 +8,7 @@ class Creature: public Entity { public: Creature(Window m, std::string s); - void Behavior(); + int Behavior(); bool Action(); void Priority(); Location getLocation(); diff --git a/inc/location.hpp b/inc/location.hpp index 71bf938..e45642d 100644 --- a/inc/location.hpp +++ b/inc/location.hpp @@ -7,7 +7,7 @@ class Location Location(){x=y=type=0;}; //is this line needed? Location(int x1, int y1, int t1){x=x1;y=y1;type=t1;}; - int x; //x-coordinate of entity + int x; //x-coordinate of entity int y; //y-coordinate of entity int type; //value associated with type of entity at location. 1: Creature, 2: Resource }; diff --git a/inc/resource.hpp b/inc/resource.hpp index 7417908..a1dd988 100644 --- a/inc/resource.hpp +++ b/inc/resource.hpp @@ -10,6 +10,8 @@ class Resource: public Entity Resource(Window m, std::string s); Resource(Window m, std::string s, Location z); Location getLocation(); + void eat(){amount-=10;}; + int getAmount(){return amount;}; private: int amount; //value associated with the amount of whatever (food, etc) left in the resource |