summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/creature.hpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/inc/creature.hpp b/inc/creature.hpp
index 24cad37..64efd26 100644
--- a/inc/creature.hpp
+++ b/inc/creature.hpp
@@ -13,19 +13,30 @@ class Creature: public Entity
bool Action();
void Priority();
Location getLocation();
- void give(vector<Resource*> n){nR=n;};
+ void giveR(vector<Resource*> n){nR=n;};
+ void giveC(vector<Creature*> n){nC=n;};
int getHealth(){return health;};
double Distance(Location A, Location B);
+ bool doesItHaveTarget();
+ int getBestSense(){return bestSense;};
private:
int xTarget; //x-coordinate of creature's target position
int yTarget; //y-coordinate of creature's target position
+
bool hasTarget;
+ bool wandering;
+
int health; //health of a creature (0-100)
+ int maxHealth;
int hunger; //value associated with a creatures want to find food (0-100)
int speed = 1;
- vector<Resource*> nR; //vector containing objects near the creature
- int n; // counter for which place in resource array is targeted
+ bool able; // ability to reproduce
+ int bestSense = 100; // Distance it can see/smell/hear
+
+ vector<Resource*> nR; //vector containing resources near the creature
+ vector<Creature*> nC; //vector containing creatures near the creature
+ int n; // counter for which place in resource array is targeted
};
#endif