aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5be1194..57b7077 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,5 +1,6 @@
#include <cstdio>
#include <cstdlib>
+#include <print>
#include <string>
#include "board.hpp"
@@ -44,5 +45,24 @@ int main(int argc, char **argv) {
printBoard(&b);
auto moves = GetLegalMoves(&b);
PrintMoves(moves);
+ while (true) {
+ std::cout << "> ";
+ std::string command;
+ std::cin >> command;
+
+ transform(command.begin(), command.end(), command.begin(), ::toupper);
+ if (command.length() != 4) {
+ std::cout << "Unknown Command, use EXIT to exit";
+ std::println();
+ continue;
+ }
+ if (command == "EXIT") {
+ std::println();
+ std::cout << "Exiting...\n";
+ return 0;
+ }
+ std::cout << command;
+ std::println();
+ }
return EXIT_SUCCESS;
}