From 6b967f3bd7a3e7203b57bd9e4edb0db82bc9ed1c Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 26 May 2015 14:04:04 -0500 Subject: revamped the list and creatures two bugs i can see right now -somehow when a resource has less than 0 amount it still sticks around (somewhat rare) -some creatures just bounce back and forth until they die not getting to their target --- src/resource.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/resource.cpp') diff --git a/src/resource.cpp b/src/resource.cpp index 4f12e2d..71a13e3 100644 --- a/src/resource.cpp +++ b/src/resource.cpp @@ -28,3 +28,8 @@ Location Resource::getLocation() //Returns resource object Location L(xPosition,yPosition,2); return L; } + +void Resource::eat() +{ + amount-=10; +} -- cgit v1.2.3