aboutsummaryrefslogtreecommitdiff
path: root/frontend/cmd/help.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-29 15:22:59 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-29 15:22:59 +0100
commit7285f9f2c2622acff734e31314f92df9b25cae16 (patch)
tree36500df9ba5cf45b20f705d4c478afd2b7903a6f /frontend/cmd/help.cpp
parent953f18fe681a2f120dab5be9e9884bf35765e21e (diff)
split commands into separate files
Diffstat (limited to 'frontend/cmd/help.cpp')
-rw-r--r--frontend/cmd/help.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/frontend/cmd/help.cpp b/frontend/cmd/help.cpp
new file mode 100644
index 0000000..1ae1fde
--- /dev/null
+++ b/frontend/cmd/help.cpp
@@ -0,0 +1,15 @@
+#include "../print.h"
+#include "../Player.h"
+
+FollowupAction Player::cmd_help(Argv argv) {
+ lprtf("De beschikbare commando's zijn: ");
+ bool first = true;
+ for (auto & [ key, _ ] : this->cmds) {
+ if (!first) lprtf(", ");
+ lprtf("%s", key.c_str());
+ first = false;
+ }
+ lprtf(".\n");
+ return FollowupAction::NONE;
+}
+