From c63d77ddddb69ef0f641d90a8c3922fdc356224c Mon Sep 17 00:00:00 2001 From: dakjos Date: Thu, 7 May 2015 19:53:39 -0500 Subject: Some variable names changed and many comments made so I understand what the fuck is going on --- inc/creature.hpp | 12 ++++++------ inc/entity.hpp | 4 ++-- inc/list.hpp | 2 +- inc/location.hpp | 10 +++++----- inc/resource.hpp | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) (limited to 'inc') 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 Z){K=Z;}; + void giveKnown(std::vector Z){location = Z;}; private: - int xT; - int yT; - int hp; - int hu; - std::vector 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; //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 R; std::vector C; std::vector 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 -- cgit v1.2.3