diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/creature.hpp | 4 | ||||
-rw-r--r-- | inc/list.hpp | 3 | ||||
-rw-r--r-- | inc/quadtree.hpp | 5 |
3 files changed, 5 insertions, 7 deletions
diff --git a/inc/creature.hpp b/inc/creature.hpp index f9cb979..8174cf6 100644 --- a/inc/creature.hpp +++ b/inc/creature.hpp @@ -1,9 +1,7 @@ #ifndef creature_h #define creature_h -#include <cstdlib> #include <vector> -#include <list> #include <algorithm> #include "entity.hpp" @@ -21,7 +19,7 @@ class Creature: public Entity void checkTarget(); void moveTowards(Rectangle r); void impregnate(DNA d); - void giveNearMe(std::list<Entity*> n){nearMe = {std::begin(n),std::end(n)};}; + void giveNearMe(std::vector<Entity*> n){nearMe = n;}; DNA getDNA(){return myDNA;}; DNA getChildsDNA(){return childsDNA;}; diff --git a/inc/list.hpp b/inc/list.hpp index 872d5fa..f62112c 100644 --- a/inc/list.hpp +++ b/inc/list.hpp @@ -17,7 +17,8 @@ class List void Place(); void Remove(); - std::list<Entity*> getNear(Creature c); + std::vector<Entity*> getNear(Creature c); + std::list<Resource> resources; std::list<Creature> creatures; diff --git a/inc/quadtree.hpp b/inc/quadtree.hpp index 2b07103..bf308f8 100644 --- a/inc/quadtree.hpp +++ b/inc/quadtree.hpp @@ -1,7 +1,6 @@ #ifndef quadtree_h
#define quadtree_h
-#include <list>
#include <vector>
#include "constants.hpp"
@@ -21,8 +20,8 @@ class Quadtree { void clear();
void insert(Entity* iter);
- std::list<Entity*> retrieve(std::list<Entity*> returnObject, GraphicsData obj);
- std::list<Entity*> objects;
+ std::vector<Entity*> retrieve(std::vector<Entity*> returnObject, GraphicsData obj);
+ std::vector<Entity*> objects;
Quadtree* nodes;
|