Fixed several issues with Parser and enabled room navigation

This commit is contained in:
2026-08-21 20:02:11 -05:00
parent b1e87868c8
commit 3e50d46284
9 changed files with 91 additions and 43 deletions
+1 -6
View File
@@ -1,6 +1,5 @@
#include "CommandParser.h"
#include <algorithm>
#include <cstring>
#include <iostream>
#include <sstream>
@@ -24,10 +23,6 @@ std::vector<std::string> CommandParser::Verb(std::stringstream &sentences) {
}
}
if (verbs.empty()) {
CommandUnrecognized();
}
return verbs;
}
@@ -68,7 +63,7 @@ int CommandParser::Parse() {
for (const auto &verb: verbs) {
if (!commands[verb]) {
printf("Sorry kid, can't understand ya! \n");
CommandUnrecognized();
break;
}
toRun = commands[verb];