summaryrefslogtreecommitdiff
path: root/inc/creature.hpp
diff options
context:
space:
mode:
authoriamn1ck <iamn1ck@yahoo.com>2017-02-19 07:00:34 -0600
committerTom Barrett <tombarrett@siu.edu>2017-03-07 13:22:46 -0600
commit74c6854fd8dcbaee736ac0421805ff1e03c4a1e2 (patch)
tree4a3ae40bea9b07a2111128e98d9272bdbac2af87 /inc/creature.hpp
parent03885192b9ff7d3c5e2dcfd98aefd21e9b62f603 (diff)
-quadtree and opengl rendering are now in the master branch !
-using sdl_rect for location and size ended up being not so great due to it not having floats, so we reverted back to using location -much, much refractoring is now needed
Diffstat (limited to 'inc/creature.hpp')
-rw-r--r--inc/creature.hpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/inc/creature.hpp b/inc/creature.hpp
index 67617c6..1bc6f49 100644
--- a/inc/creature.hpp
+++ b/inc/creature.hpp
@@ -3,6 +3,7 @@
#include <SDL2/SDL.h>
#include <vector>
+#include <list>
#include <algorithm>
#include "entity.hpp"
@@ -13,15 +14,15 @@
class Creature: public Entity
{
public:
- Creature(Window M, SDL_Rect R, Dna D);
+ Creature(Location t, Dna D);
void Behavior();
void Action();
void Priority();
void setTarget();
void checkTarget();
- void moveTowards(SDL_Rect R);
+ void moveTowards(Location t);
void impregnate(Dna D);
- void giveN(std::vector<Entity*> n){N = n;};
+ void giveN(std::list<Entity*> n){N = n;};
Dna getDNA(){return mine;};
Dna getChildDNA(){return childs;};
@@ -32,9 +33,9 @@ class Creature: public Entity
void hadPregnancy(){pregnate = pregnancyReady = false;};
private:
- SDL_Rect wTarget;
+ Location wTarget;
Entity *target;
- std::vector<Entity*> N;
+ std::list<Entity*> N;
Dna mine;
Dna childs;