From a6fab8248af2a759bb16a2c1ad9997e86ab5d89f Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sat, 31 Oct 2020 02:08:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=96=B0=E5=BB=BA=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E6=8C=89=E9=92=AE=E5=90=8E=E7=AD=89=E5=BE=85=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=AE=8C=E6=AF=95=E6=89=8D=E5=BC=80=E5=A7=8B=E6=96=B0?= =?UTF-8?q?=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/uci.cpp | 5 ----- src/ui/qt/gamecontroller.cpp | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/uci.cpp b/src/uci.cpp index 7f783f97..389bd6d5 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -112,11 +112,6 @@ void go(Position *pos) { #ifdef UCI_AUTO_RESTART // TODO -#if 0 - for (int i = 0; i < 100000; i++) { - } -#endif - while (true) { if (Threads.main()->searching == true) { continue; diff --git a/src/ui/qt/gamecontroller.cpp b/src/ui/qt/gamecontroller.cpp index 8a010cff..b473dd69 100644 --- a/src/ui/qt/gamecontroller.cpp +++ b/src/ui/qt/gamecontroller.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "gamecontroller.h" @@ -185,6 +186,13 @@ void GameController::gameStart() void GameController::gameReset() { + while (aiThread[BLACK]->searching || aiThread[WHITE]->searching) { + loggerDebug("."); + QThread::msleep(100); + } + + loggerDebug("\n"); + // 停止计时器 if (timeID != 0) killTimer(timeID);