summaryrefslogtreecommitdiff
path: root/inc/creature.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'inc/creature.hpp')
-rw-r--r--inc/creature.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/inc/creature.hpp b/inc/creature.hpp
index 0f9128f..01f6557 100644
--- a/inc/creature.hpp
+++ b/inc/creature.hpp
@@ -2,7 +2,9 @@
#define creature_h
#include <cstdlib>
+#include <vector>
#include <list>
+#include <algorithm>
#include "entity.hpp"
#include "functions.hpp"
@@ -19,7 +21,7 @@ class Creature: public Entity
void checkTarget();
void moveTowards(Rectangle t);
void impregnate(DNA D);
- void giveNearMe(std::list<Entity*> n){nearMe = n;};
+ void giveNearMe(std::list<Entity*> n){nearMe = {std::begin(n),std::end(n)};};
DNA getDNA(){return myDNA;};
DNA getChildsDNA(){return childsDNA;};
@@ -32,7 +34,7 @@ class Creature: public Entity
private:
Rectangle wTarget;
Entity* target;
- std::list<Entity*> nearMe;
+ std::vector<Entity*> nearMe;
DNA myDNA;
DNA childsDNA;