summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/creature.hpp4
-rw-r--r--inc/entity.hpp3
-rw-r--r--inc/resource.hpp3
3 files changed, 7 insertions, 3 deletions
diff --git a/inc/creature.hpp b/inc/creature.hpp
index f3bd723..ffff888 100644
--- a/inc/creature.hpp
+++ b/inc/creature.hpp
@@ -31,12 +31,14 @@ class Creature: public Entity
int health;
int maxHealth;
int hunger;
- int speed = 2;
+ int speed = 1;
bool able;
int bestSense = 100;
vector<Resource*> nR; //vector containing resources near the creature
vector<Creature*> nC; //vector containing creatures near the creature
+ vector<Entity*> N;
+
int n;
};
diff --git a/inc/entity.hpp b/inc/entity.hpp
index 3555c62..ee42858 100644
--- a/inc/entity.hpp
+++ b/inc/entity.hpp
@@ -14,7 +14,8 @@ class Entity
Location L;
int height, width; //Dimensions of image on window
int degrees = 0;
- SDL_Texture* texture;
+ int type = 0;
+ SDL_Texture* texture;
SDL_Renderer* renderer;
};
diff --git a/inc/resource.hpp b/inc/resource.hpp
index 5c45f96..968c208 100644
--- a/inc/resource.hpp
+++ b/inc/resource.hpp
@@ -9,8 +9,9 @@ class Resource: public Entity
public:
Resource(Window m, std::string s);
Resource(Window m, std::string s, Location z);
- Location getLocation();
void eat();
+
+ Location getLocation(){return L;};
int getAmount(){return amount;};
private: