summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/creature.hpp12
-rw-r--r--inc/entity.hpp4
-rw-r--r--inc/list.hpp2
-rw-r--r--inc/location.hpp10
-rw-r--r--inc/resource.hpp2
5 files changed, 15 insertions, 15 deletions
diff --git a/inc/creature.hpp b/inc/creature.hpp
index a0046fb..9a26ee8 100644
--- a/inc/creature.hpp
+++ b/inc/creature.hpp
@@ -12,14 +12,14 @@ class Creature: public Entity
void Action();
void Priority();
Location getLocation();
- void giveKnown(std::vector<Location> Z){K=Z;};
+ void giveKnown(std::vector<Location> Z){location = Z;};
private:
- int xT;
- int yT;
- int hp;
- int hu;
- std::vector<Location> K;
+ int xTarget; //x-coordinate of creature's target position
+ int yTarget; //y-coordinate of creature's target position
+ int health; //health of a creature (0-100)
+ int hunger; //value associated with a creatures want to find food (0-100)
+ std::vector<Location> location; //vector containing creatures location on window or target location?
};
#endif
diff --git a/inc/entity.hpp b/inc/entity.hpp
index 5ed2e74..079da9b 100644
--- a/inc/entity.hpp
+++ b/inc/entity.hpp
@@ -10,8 +10,8 @@ class Entity
SDL_Texture* loadTexture(std::string path, Window main);
protected:
- int x, y;
- int height, width;
+ int xPosition, yPosition; //Coordinates of entity on window
+ int height, width; //Dimensions of image on window
int degrees = 0;
SDL_Texture* texture;
SDL_Renderer* renderer;
diff --git a/inc/list.hpp b/inc/list.hpp
index 96509aa..074e045 100644
--- a/inc/list.hpp
+++ b/inc/list.hpp
@@ -15,7 +15,7 @@ class List
double Distance(Location A, Location B);
private:
- //Window main;
+ //vectors containing objects of each type
std::vector<Resource> R;
std::vector<Creature> C;
std::vector<Location> L;
diff --git a/inc/location.hpp b/inc/location.hpp
index 6a20b4e..8bd512c 100644
--- a/inc/location.hpp
+++ b/inc/location.hpp
@@ -4,12 +4,12 @@
class Location
{
public:
- Location(){x=y=t=0;};
- Location(int x1, int y1, int t1){x=x1;y=y1;t=t1;};
+ Location(){x=y=type=0;}; //is this line needed?
+ Location(int x1, int y1, int t1){x=x1;y=y1;type=t1;};
- int x;
- int y;
- int t;
+ 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
};
#endif
diff --git a/inc/resource.hpp b/inc/resource.hpp
index 2738f44..383e9ef 100644
--- a/inc/resource.hpp
+++ b/inc/resource.hpp
@@ -11,7 +11,7 @@ class Resource: public Entity
Location getLocation();
private:
- int amount;
+ int amount; //value associated with the amount of whatever (food, etc) left in the resource
};
#endif