diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-30 14:48:02 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-30 14:48:02 +0100 |
commit | 6dfa3fb34fb0a2ea028fd46e77296e26b092fb99 (patch) | |
tree | 51257e54561550c91dbec262fe143d4dbe41f059 /frontend/cmd/view.cpp | |
parent | 862186ae7cbbd922057fa5f6b49509c36f9ade36 (diff) |
use string instead of argument vector for commands
Diffstat (limited to 'frontend/cmd/view.cpp')
-rw-r--r-- | frontend/cmd/view.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/frontend/cmd/view.cpp b/frontend/cmd/view.cpp index 0636cac..b9d179b 100644 --- a/frontend/cmd/view.cpp +++ b/frontend/cmd/view.cpp @@ -2,13 +2,15 @@ #include "../Player.h" #include "../strings.h" -FollowupAction Player::cmd_view(Argv argv) { - if (argv.size() == 0) { +using namespace std; + +FollowupAction Player::cmd_view(string & target) { + if (target.size() == 0) { lprtf("Fout, gebruik: Bekijk <Zelf|VIJHAND|OBJECT>\n"); return FollowupAction::NONE; } - if (str_lower(argv[0]) == "zelf") { + if (str_lower(target) == "zelf") { lprtf("Je hebt %d levenspunten.\n", this->health_points); lprtf("Je hebt een aanvalskans van %.0f%%.\n", this->get_attack() * 100); // TODO: weapon |