summaryrefslogtreecommitdiff
path: root/inc/creature.hpp
diff options
context:
space:
mode:
authormajortom6 <tombarrett@siu.edu>2017-02-26 11:14:31 -0600
committerTom Barrett <tombarrett@siu.edu>2017-03-07 13:23:42 -0600
commit7394b069537ed7a490a343381d62862eb22abdcf (patch)
treec8bff4f88cf962ec4148a2e133bf959035feedb7 /inc/creature.hpp
parente54170cfb8c0fb99ecdc3b1e57e832dec58ee76e (diff)
-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
Diffstat (limited to 'inc/creature.hpp')
-rw-r--r--inc/creature.hpp51
1 files changed, 0 insertions, 51 deletions
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 <vector>
-#include <algorithm>
-
-#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<Entity*> 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<Entity*> nearMe;
- DNA myDNA;
- DNA childsDNA;
-
- int health;
- int amountAte;
- int pregnancyTime;
- int age;
-
- bool hungry;
- bool pregnancyReady;
- bool able;
- bool hasTarget;
- bool wander;
-};
-
-#endif