From ffcee12acf3fe3f972f322c18b3203212682205d Mon Sep 17 00:00:00 2001 From: tom Date: Thu, 7 May 2015 12:35:15 -0500 Subject: woo! detection is implemented albeit shitty --- inc/creature.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'inc/creature.hpp') diff --git a/inc/creature.hpp b/inc/creature.hpp index f72dfbc..a0046fb 100644 --- a/inc/creature.hpp +++ b/inc/creature.hpp @@ -10,14 +10,16 @@ class Creature: public Entity Creature(Window m, std::string s); void Behavior(); void Action(); + void Priority(); Location getLocation(); + void giveKnown(std::vector Z){K=Z;}; private: int xT; int yT; int hp; int hu; - Location K[3]; + std::vector K; }; #endif -- cgit v1.2.3 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 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'inc/creature.hpp') 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 -- cgit v1.2.3 From 8c5121486a0e5d94ae5e5ee67370a31530cf8b6f Mon Sep 17 00:00:00 2001 From: tom Date: Fri, 8 May 2015 08:23:06 -0500 Subject: fixed some comments and cleaned around --- inc/creature.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/creature.hpp') diff --git a/inc/creature.hpp b/inc/creature.hpp index 9a26ee8..9bb73ee 100644 --- a/inc/creature.hpp +++ b/inc/creature.hpp @@ -19,7 +19,7 @@ class Creature: public Entity 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? + std::vector location; //vector containing objects near the creature }; #endif -- cgit v1.2.3