diff options
| author | Adam <adammegarules1@gmail.com> | 2026-07-26 11:08:43 +0200 |
|---|---|---|
| committer | Adam <adammegarules1@gmail.com> | 2026-07-26 11:08:43 +0200 |
| commit | 7609c9d8e614d02c7ad532171c361f012857e3d8 (patch) | |
| tree | 5e51f0f4d2ec7f02eb252971ea3d0d47ba56af4a /src/main.cpp | |
| parent | 773f4de323393180db4ac56969fb2ecdaeef9079 (diff) | |
adding good readme
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 20 |
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; } |
