summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortom <tom@ground-control>2015-11-22 19:56:45 -0600
committertom <tom@ground-control>2015-11-22 19:56:45 -0600
commit4c50cb6b322368a89feef13efa091c765c966e5b (patch)
treef4d8a9145c9541d1eeb354e917b7bb91e8730f8b
parent84d63287c4d052052c9975714bbc253b18d28920 (diff)
small changes
-rw-r--r--inc/Character.hpp2
-rw-r--r--src/Character.cpp9
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;
}
}