aboutsummaryrefslogtreecommitdiff
path: root/frontend/cmd/go.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-02 23:11:42 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-02 23:11:42 +0100
commited78baff64fe45479ca6c480d985ce0f9c0c9515 (patch)
treeb3224d0d01dc0c563c8e49751c628994b66f58b6 /frontend/cmd/go.cpp
parent07b8a5b0baed8c7b23681c99f25f297045945bfc (diff)
more bug fixes
Diffstat (limited to 'frontend/cmd/go.cpp')
-rw-r--r--frontend/cmd/go.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/frontend/cmd/go.cpp b/frontend/cmd/go.cpp
index b8bb7e2..6fb9105 100644
--- a/frontend/cmd/go.cpp
+++ b/frontend/cmd/go.cpp
@@ -14,11 +14,10 @@ static const unordered_map<string, Direction> direction_map = {
{ "west", Direction::WEST },
};
-void GameController::cmd_go(string & argv) {
- string direction_str = str_consume_arg(argv);
+void GameController::cmd_go(string & direction_str) {
if (direction_str.size() == 0)
throw Exception("dit commando heeft nog een argument met een richting nodig");
- if (!direction_map.contains(direction_str))
+ if (!direction_map.contains(str_lower(direction_str)))
throw Exception("onbekende richting \"%s\", probeer noord|zuid|oost|west", direction_str.c_str());
Player & player = this->dungeon->get_player();