From 74c6854fd8dcbaee736ac0421805ff1e03c4a1e2 Mon Sep 17 00:00:00 2001 From: iamn1ck Date: Sun, 19 Feb 2017 07:00:34 -0600 Subject: -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 --- inc/creature.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'inc/creature.hpp') 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 #include +#include #include #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 n){N = n;}; + void giveN(std::list 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 N; + std::list N; Dna mine; Dna childs; -- cgit v1.2.3