summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authortom <tombarrett@siu.edu>2017-02-12 07:57:21 -0600
committertom <tombarrett@siu.edu>2017-02-12 07:57:21 -0600
commit1da46794f74ebd8f445fcd70cbe0420eadb648e4 (patch)
treefee655a50188e50b7c63d6b855bc671e0a1b0128 /inc
parent358ea01c03d787377ef88945706f350befd5b7a9 (diff)
-removed grouping
Diffstat (limited to 'inc')
-rw-r--r--inc/creature.hpp7
-rw-r--r--inc/list.hpp3
2 files changed, 6 insertions, 4 deletions
diff --git a/inc/creature.hpp b/inc/creature.hpp
index 95b1329..c3ed2d8 100644
--- a/inc/creature.hpp
+++ b/inc/creature.hpp
@@ -2,7 +2,8 @@
#define creature_h
#include <SDL2/SDL.h>
-#include <list>
+#include <vector>
+#include <algorithm>
#include "entity.hpp"
#include "constants.hpp"
@@ -20,7 +21,7 @@ class Creature: public Entity
void checkTarget();
void Move(SDL_Rect R);
void impregnate();
- void giveN(std::list<Entity*> n){N = n;};
+ void giveN(std::vector<Entity*> n){N = n;};
Dna getDNA(){return mine;};
int getHealth(){return health;};
@@ -32,7 +33,7 @@ class Creature: public Entity
private:
SDL_Rect wTarget;
Entity *target;
- std::list<Entity*> N;
+ std::vector<Entity*>N;
Dna mine;
int health;
diff --git a/inc/list.hpp b/inc/list.hpp
index 7d3d8a2..64b3ec5 100644
--- a/inc/list.hpp
+++ b/inc/list.hpp
@@ -3,6 +3,7 @@
#include <SDL2/SDL.h>
#include <list>
+#include <vector>
#include "functions.hpp"
#include "creature.hpp"
@@ -17,7 +18,7 @@ class List
void Behavior();
void Place();
void Remove();
- std::list<Entity*> getNear(Creature C);
+ std::vector<Entity*> getNear(Creature C);
private:
Window main = Window("do not create new window.");