From 0346965968fb5da1a52ed8f896a922c63ce180f6 Mon Sep 17 00:00:00 2001 From: tom Date: Mon, 2 May 2016 18:23:19 -0500 Subject: done refractoring type --- src/creature.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/creature.cpp') diff --git a/src/creature.cpp b/src/creature.cpp index 9404ba2..f2b85e5 100644 --- a/src/creature.cpp +++ b/src/creature.cpp @@ -10,7 +10,8 @@ Creature::Creature(Window m, std::string s) L.y=yTarget=rand()%800; L.x=xTarget=rand()%1200; - + type = 1; + hasTarget = false; wandering = false; able = true; @@ -23,16 +24,13 @@ int Creature::Behavior() this->Priority(); - if(this->Action()) - { - if(nR.size()) - { + if(this->Action()){ + if(nR.size()){ nR[n]->eat(); if(healthgetLocation(),L)<5) wandering = false; hasTarget = false; -- cgit v1.2.3