From 5d97a0154ed1c5584c50884e086dcaa3536e5672 Mon Sep 17 00:00:00 2001 From: tom Date: Sat, 2 May 2015 17:31:50 -0500 Subject: added basic movement --- src/creature.cpp | 26 ++++++++++++++++++-------- src/main.cpp | 1 + 2 files changed, 19 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/creature.cpp b/src/creature.cpp index 207d3bd..d958d09 100644 --- a/src/creature.cpp +++ b/src/creature.cpp @@ -22,26 +22,36 @@ void Creature::Behavior() void Creature::Action() { - //if(isclose) - // eat//reproduce//etc; + //std::cout << (sqrt(((x-xT)^2)+((y-yT)^2)); + if((sqrt(((x-xT)^2)+((y-yT)^2)))<2) + return; //eat//reproduce//etc; if(x==xT) - { if(y