#include "creature.hpp" Creature::Creature(Window m, std::string s) //Constructor { texture = loadTexture(s, m); renderer = m.getRenderer(); health = 100; hunger = 0; //initializes random start coordinates for creature, target position is equivalent to it's position int yStart = rand()%800; int xStart = rand()%1200; yPosition=yTarget=yStart; xPosition=xTarget=xStart; } void Creature::Behavior() { health--; //Decrements health each time a behavior is executed //Detection this->Priority(); //Checks which action has priority (doesn't really do this right now) this->Action(); //Does action } void Creature::Priority() { //Traverses location vector, if object at [i] is resource (2), then creature's target coordinates are set int i; for(i=0;ixTarget) { if(yPosition