点击新建游戏按钮后等待搜索完毕才开始新局
This commit is contained in:
parent
d674389cb7
commit
a6fab8248a
|
@ -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;
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <QPropertyAnimation>
|
||||
#include <QParallelAnimationGroup>
|
||||
#include <QDir>
|
||||
#include <QThread>
|
||||
#include <iomanip>
|
||||
|
||||
#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);
|
||||
|
|
Loading…
Reference in New Issue