diff options
-rw-r--r-- | inc/Character.hpp | 2 | ||||
-rw-r--r-- | src/Character.cpp | 9 |
2 files changed, 2 insertions, 9 deletions
diff --git a/inc/Character.hpp b/inc/Character.hpp index 9773762..1a7dcdd 100644 --- a/inc/Character.hpp +++ b/inc/Character.hpp @@ -14,7 +14,7 @@ class Character Character(char nSymbol, int nColor, Location L); void move(Location L){l=L;} void draw(WINDOW * w); - Location action(vector <Character> men); + void action(vector <Character> men); bool check(Location L, vector <Character> men); Location getLocation(){return l;} char getSymbol(){return symbol;} diff --git a/src/Character.cpp b/src/Character.cpp index 0ab594b..5ebc39e 100644 --- a/src/Character.cpp +++ b/src/Character.cpp @@ -13,7 +13,7 @@ void Character::draw(WINDOW * w) mvwaddch(w,l.x,l.y,symbol); } -Location Character::action(vector <Character> men) +void Character::action(vector <Character> men) { if(order == "wander") { @@ -60,17 +60,10 @@ Location Character::action(vector <Character> men) Lo.y = l.y+1; } else - { Lo = l; - } if(check(Lo,men)) - { move(Lo); - return Lo; - } - else - return l; } } |