#include "creature.hpp" Creature::Creature(Window m, std::string s) { texture = loadTexture(s, m); renderer = m.getRenderer(); hp = 100; hu = 0; int zy = rand()%800; int zx = rand()%1200; y=yT=zy; x=xT=zx; //std::cout << x << ' ' << y << std::endl; //For the test resource //xT=yT=300; } void Creature::Behavior() { hp--; //Detection //Priorities this->Priority(); //Action this->Action(); } void Creature::Action() { //std::cout << (sqrt(((x-xT)^2)+((y-yT)^2)); if(sqrt(pow(x-xT,2)+pow(y-yT,2))<2) return; //eat//reproduce//etc; if(x==xT) { if(yxT) { if(y