From 7394b069537ed7a490a343381d62862eb22abdcf Mon Sep 17 00:00:00 2001 From: majortom6 Date: Sun, 26 Feb 2017 11:14:31 -0600 Subject: -REMOVED ENTITY, RESOURCE, AND CREATURE ! -replaced them all with one class, organism (always subject to change) -the dna type now is what differs creatures and resources -removed dead constants -may be a rogue segfault -also weird artifacts start showing if running long --- inc/creature.hpp | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 inc/creature.hpp (limited to 'inc/creature.hpp') diff --git a/inc/creature.hpp b/inc/creature.hpp deleted file mode 100644 index 8174cf6..0000000 --- a/inc/creature.hpp +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef creature_h -#define creature_h - -#include -#include - -#include "entity.hpp" -#include "functions.hpp" - -class Creature: public Entity -{ - public: - Creature(Rectangle r, DNA d); - - void Behavior(); - void Action(); - void Priority(); - void setTarget(); - void checkTarget(); - void moveTowards(Rectangle r); - void impregnate(DNA d); - void giveNearMe(std::vector n){nearMe = n;}; - - DNA getDNA(){return myDNA;}; - DNA getChildsDNA(){return childsDNA;}; - int getHealth(){return health;}; - int getBestSense(){return myDNA.bestSense;}; - bool getGender(){return gender;}; - bool getPregnancyReady(){return pregnancyReady;}; - void hadPregnancy(){pregnate = pregnancyReady = false;}; - - private: - Rectangle wTarget; - Entity* target; - std::vector nearMe; - DNA myDNA; - DNA childsDNA; - - int health; - int amountAte; - int pregnancyTime; - int age; - - bool hungry; - bool pregnancyReady; - bool able; - bool hasTarget; - bool wander; -}; - -#endif -- cgit v1.2.3