From ce6b35d717de85a7ac45fa98197edf13e1820c8a Mon Sep 17 00:00:00 2001 From: tom Date: Fri, 8 May 2015 17:41:48 -0500 Subject: added removal of resources once eaten, from the L and R vector creatures that done move don't die right now, we need them to wander if they dont have a priority **difficult** --- src/list.cpp | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'src/list.cpp') diff --git a/src/list.cpp b/src/list.cpp index 6317d45..cd69f8f 100644 --- a/src/list.cpp +++ b/src/list.cpp @@ -46,12 +46,42 @@ void List::Place() void List::Behavior() { - int i, j; + int i, j, k, l; std::vector Z; for(i = 0; i < C.size(); i++) { - C[i].Behavior(); //executes the behavior of the creature at i + int o = C[i].Behavior(); + + if(o==1) + { + //If next to creature + } + + if(o==2) + { + //If next to resource + Location tmp = C[i].getLocation(); + for(k=0;k