console: 解决AI落子很快时棋盘打印不全的问题
This commit is contained in:
parent
23cae8364b
commit
f75ce94dc3
|
@ -254,8 +254,9 @@ void AiThread::run()
|
|||
strCommand = ai.nextMove();
|
||||
if (strCommand && strcmp(strCommand, "error!") != 0) {
|
||||
loggerDebug("Computer: %s\n\n", strCommand);
|
||||
analyze();
|
||||
|
||||
emitCommand();
|
||||
//analyze();
|
||||
}
|
||||
}
|
||||
#ifdef OPENING_BOOK
|
||||
|
|
|
@ -949,6 +949,7 @@ bool GameController::command(const QString &cmd, bool update /* = true */)
|
|||
}
|
||||
|
||||
if (update) {
|
||||
//cout << position << endl;
|
||||
playSound(soundType, position.side_to_move());
|
||||
updateScence(&position);
|
||||
}
|
||||
|
@ -1081,6 +1082,12 @@ bool GameController::command(const QString &cmd, bool update /* = true */)
|
|||
}
|
||||
#endif // TRAINING_MODE
|
||||
|
||||
if (isAiPlayer[BLACK]) {
|
||||
aiThread[BLACK]->analyze();
|
||||
} else if (isAiPlayer[WHITE]) {
|
||||
aiThread[WHITE]->analyze();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue