diff options
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; } |