diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-01 10:18:22 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-01 10:18:22 +0100 |
commit | 798948dbe6f012e194f053c4e862cf697f30b793 (patch) | |
tree | 32c71420d1188f98cfb41b6f0d9536c5fa4bf5a7 /frontend/cmd/search.cpp | |
parent | d7012045bb61f117fb7b9c51ddd03e4c54f25fe6 (diff) |
more WIP (move some Player things to backend)
Diffstat (limited to 'frontend/cmd/search.cpp')
-rw-r--r-- | frontend/cmd/search.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/frontend/cmd/search.cpp b/frontend/cmd/search.cpp index f10709a..f7fb528 100644 --- a/frontend/cmd/search.cpp +++ b/frontend/cmd/search.cpp @@ -1,16 +1,18 @@ -#include "../Player.h" +#include "../GameController.h" #include "backend/print.h" #include "backend/Location.h" using namespace std; -FollowupAction Player::cmd_search(string &) { +FollowupAction GameController::cmd_search(string &) { + Location & location = this->player.get_location(); + bool found = false; - for (Object * object : this->location.get_hidden_objects()) { + for (Object * object : location.get_hidden_objects()) { if (!found) lprtf("Je vindt:\n"); lprtf("- %s\n", object->get_displayname().c_str()); - this->location.unhide_object(object); + location.unhide_object(object); found = true; } if (!found) |