From 74e1e8456add105dc4d3df1b2d9eaa515ee87b7e Mon Sep 17 00:00:00 2001 From: Nicola Revelant Date: Fri, 15 Mar 2024 17:35:45 +0100 Subject: [PATCH] Wait 5 seconds between player move and PC move only in debug mode --- src/checkers/MatchManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/checkers/MatchManager.cpp b/src/checkers/MatchManager.cpp index 914fa8d..9bc75ee 100644 --- a/src/checkers/MatchManager.cpp +++ b/src/checkers/MatchManager.cpp @@ -16,6 +16,7 @@ */ #include "checkers/MatchManager.h" +#include #include #include @@ -162,7 +163,10 @@ void MatchManager::updateDisposition(GameUtils::Disposition *newDisposition) { void MatchManager::makePCMove() { changeState(TURN_PC); +#ifdef DEBUG + std::cerr << "Waiting 5 seconds for debug..." << std::endl; sleep(5); // TODO: test delay +#endif auto *pcMove = GameUtils::calculateBestMove(mDisposition, mGameDifficulty); if (pcMove == nullptr) { // PC cannot do anything, player won