From 7609c9d8e614d02c7ad532171c361f012857e3d8 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 26 Jul 2026 11:08:43 +0200 Subject: adding good readme --- src/main.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/main.cpp') 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 #include +#include #include #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; } -- cgit v1.2.3