summaryrefslogtreecommitdiff
path: root/inc/creature.hpp
diff options
context:
space:
mode:
authormajortom6 <tombarrett@siu.edu>2017-02-19 12:00:52 -0600
committerTom Barrett <tombarrett@siu.edu>2017-03-07 13:23:41 -0600
commit0846d5802965d257f176e033d7a6ac353ed648f3 (patch)
tree1ada2e260970883decd2165d3dd3b74ad34212fd /inc/creature.hpp
parentbfdc713b68dd6f8d61e7b26fc2cff15caf24b44d (diff)
-speedcaps now working again
-creatures now randomize target better again -thats enough for today, src is still a mess and main can be cleaned a bit
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;