From 9f0de11816fdbd0981aeaa3a840e3942fd249eb4 Mon Sep 17 00:00:00 2001 From: tom Date: Sun, 22 Nov 2015 15:21:30 -0600 Subject: cleaned up a little and added pausing, the location vector in list.*pp is overkill, should probably just be using the men vector for everything --- src/Character.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/Character.cpp') diff --git a/src/Character.cpp b/src/Character.cpp index 423a342..8b4a4b5 100644 --- a/src/Character.cpp +++ b/src/Character.cpp @@ -64,8 +64,6 @@ Location Character::action(vector occupied) Lo = l; } - //move(Lo); - if(check(Lo,occupied)) { move(Lo); @@ -78,12 +76,9 @@ Location Character::action(vector occupied) bool Character::check(Location L, vector occupied) { - for(int i = 0; i < 10; i++) - { + for(int i = 0; i < 10; i++) if(L.x == occupied[i].x && L.y == occupied[i].y) - { return false; - } - } + return true; } -- cgit v1.2.3