aboutsummaryrefslogtreecommitdiff
path: root/frontend/cmd/query.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/cmd/query.cpp')
-rw-r--r--frontend/cmd/query.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/frontend/cmd/query.cpp b/frontend/cmd/query.cpp
index e1e45a1..23d2a42 100644
--- a/frontend/cmd/query.cpp
+++ b/frontend/cmd/query.cpp
@@ -1,5 +1,6 @@
#include "backend/Location.h"
#include "backend/Object.h"
+#include "backend/Enemy.h"
#include "../Player.h"
#include "../print.h"
@@ -43,7 +44,18 @@ FollowupAction Player::cmd_query(string &) {
lprtf("\n");
}
- // TODO: enemies
+ {
+ lprtf("Vijanden: ");
+ size_t enemies = 0;
+ for (Enemy * enemy : this->location.get_enemies()) {
+ if (enemies > 0) lprtf(", ");
+ lprtf("%s", enemy->get_name());
+ enemies++;
+ }
+ if (enemies == 0)
+ lprtf("(geen)");
+ lprtf("\n");
+ }
return FollowupAction::NONE;
}