diff options
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/creature.hpp | 10 | ||||
| -rw-r--r-- | inc/list.hpp | 6 | ||||
| -rw-r--r-- | inc/window.hpp | 2 | 
3 files changed, 8 insertions, 10 deletions
diff --git a/inc/creature.hpp b/inc/creature.hpp index 082e8d9..7da82e5 100644 --- a/inc/creature.hpp +++ b/inc/creature.hpp @@ -12,7 +12,7 @@ class Creature: public Entity      void Behavior();      void Action();      void Priority(); -    void giveN(vector<Entity*> n){N = n;}; +    void giveN(list<Entity*> n){N = n;};      Location getLocation(){return L;};      double Distance(Location A, Location B){return sqrt(pow(A.x-B.x,2)+pow(A.y-B.y,2));}; @@ -22,8 +22,6 @@ class Creature: public Entity    private:      bool hasTarget; -    bool wandering; -      int health;       int maxHealth;      int hunger;  @@ -31,10 +29,8 @@ class Creature: public Entity      bool able;           int bestSense = 100;  -    vector<Entity*> N; -    Entity *target; - -    int n;  +    list<Entity*> N; +    Entity *target;   };  #endif diff --git a/inc/list.hpp b/inc/list.hpp index 9d05fec..3ad8477 100644 --- a/inc/list.hpp +++ b/inc/list.hpp @@ -13,13 +13,13 @@ class List  		void Behavior();  		void Place();  		double Distance(Location A, Location B){return sqrt(pow(A.x-B.x,2)+pow(A.y-B.y,2));};     -        vector<Entity*> getNear(Creature C); +        list<Entity*> getNear(Creature C);  	private:  		//vectors containing objects of each type  		Window main = Window("no");//will be needed for adding R's and C's after constructor. -		vector<Resource> R; -		vector<Creature> C; +		list<Resource> R; +		list<Creature> C;  };  #endif diff --git a/inc/window.hpp b/inc/window.hpp index b9f9175..97e6c09 100644 --- a/inc/window.hpp +++ b/inc/window.hpp @@ -12,6 +12,8 @@  #include <vector>  #include <chrono>  #include <random> +#include <list> +  using namespace std;  | 
