diff options
author | tom <tom@ground-control> | 2015-11-22 15:21:30 -0600 |
---|---|---|
committer | tom <tom@ground-control> | 2015-11-22 15:21:30 -0600 |
commit | 9f0de11816fdbd0981aeaa3a840e3942fd249eb4 (patch) | |
tree | 2a0a8f5ac36b249e09f13848b33ab40d4c42b943 /src/Character.cpp | |
parent | 86bf68cc1f2cc81589acc2c35c4875a1230b0267 (diff) |
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
Diffstat (limited to 'src/Character.cpp')
-rw-r--r-- | src/Character.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
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 <Location> occupied) Lo = l; } - //move(Lo); - if(check(Lo,occupied)) { move(Lo); @@ -78,12 +76,9 @@ Location Character::action(vector <Location> occupied) bool Character::check(Location L, vector <Location> 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; } |