From 8c5121486a0e5d94ae5e5ee67370a31530cf8b6f Mon Sep 17 00:00:00 2001 From: tom Date: Fri, 8 May 2015 08:23:06 -0500 Subject: fixed some comments and cleaned around --- src/creature.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/creature.cpp') diff --git a/src/creature.cpp b/src/creature.cpp index ef3d6c1..5c3bb8e 100644 --- a/src/creature.cpp +++ b/src/creature.cpp @@ -8,16 +8,13 @@ Creature::Creature(Window m, std::string s) //Constructor 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; + yPosition=yTarget=rand()%800; + xPosition=xTarget=rand()%1200; } 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 } @@ -28,19 +25,17 @@ void Creature::Priority() int i; for(i=0;i