From 88579e8ab934e1ec50ee4c1a5e2d39b1308c1db9 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Fri, 8 May 2015 14:25:47 -0500 Subject: all creatures should die now, and leave a body which is a resource. they currently don't have a way to gain health so they live short sad lives. haven't compiled or tested, so more work needs to be done --- inc/creature.hpp | 3 ++- inc/resource.hpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/creature.hpp b/inc/creature.hpp index 9bb73ee..cfdd317 100644 --- a/inc/creature.hpp +++ b/inc/creature.hpp @@ -9,10 +9,11 @@ class Creature: public Entity public: Creature(Window m, std::string s); void Behavior(); - void Action(); + void Action(); void Priority(); Location getLocation(); void giveKnown(std::vector Z){location = Z;}; + int getHealth(){return health;}; private: int xTarget; //x-coordinate of creature's target position diff --git a/inc/resource.hpp b/inc/resource.hpp index 383e9ef..7417908 100644 --- a/inc/resource.hpp +++ b/inc/resource.hpp @@ -8,6 +8,7 @@ class Resource: public Entity { public: Resource(Window m, std::string s); + Resource(Window m, std::string s, Location z); Location getLocation(); private: -- cgit v1.2.3