aboutsummaryrefslogtreecommitdiff
path: root/src/repl.cpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-07-27 10:31:28 +0200
committerAdam <adammegarules1@gmail.com>2026-07-27 10:31:28 +0200
commit94f950b19069c4dbf93fff53e78d673b58c5d14b (patch)
tree2cf7ed3306b75e16ed9c737b17ad3a0ff2fedecd /src/repl.cpp
parent658a797ec8cb5b6d8607fac089e036685f2a3958 (diff)
adding resing featuare
Diffstat (limited to 'src/repl.cpp')
-rw-r--r--src/repl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/repl.cpp b/src/repl.cpp
index 2ffa59b..783d96c 100644
--- a/src/repl.cpp
+++ b/src/repl.cpp
@@ -60,6 +60,15 @@ int startREPL(Board *b) {
std::cout << "Exiting...\n";
return EXIT_SUCCESS;
}
+ if (command == "RESING") {
+ std::cout << "\033[1mOK\033[0m" << "\n";
+ if (b->turn) {
+ b->state = BLACK_WON;
+ } else {
+ b->state = WHITE_WON;
+ }
+ continue;
+ }
if (command == "BOARD") {
printBoard(b);
continue;