diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/List.cpp | 6 | ||||
-rw-r--r-- | src/main.cpp | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/List.cpp b/src/List.cpp index bd0f5d4..86049a3 100644 --- a/src/List.cpp +++ b/src/List.cpp @@ -24,3 +24,9 @@ void List::action() for(int i = 0; i < men.size(); i++) men[i].action(men,impassable); } + +void List::order(Location l) +{ + for(int i = 0; i < men.size(); i++) + men[i].giveOrder(l); +} diff --git a/src/main.cpp b/src/main.cpp index 75847a2..1588dbd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,7 +20,7 @@ int main() while(true) { char c = getch(); - Location l = cursor.getLocation(); + l = cursor.getLocation(); if (c == 'h') l.y = l.y-1; else if (c == 'l') @@ -32,7 +32,9 @@ int main() else if (c == 'q') break; else if (c == 'p') - paused = !paused; + paused = !paused; + else if (c == 'o') + L.order(l); cursor.move(l); if (!paused) |