diff --git a/src/aithread.cpp b/src/aithread.cpp index 04078420..ef75c094 100644 --- a/src/aithread.cpp +++ b/src/aithread.cpp @@ -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 diff --git a/src/ui/qt/gamecontroller.cpp b/src/ui/qt/gamecontroller.cpp index 692ce26d..526feadf 100644 --- a/src/ui/qt/gamecontroller.cpp +++ b/src/ui/qt/gamecontroller.cpp @@ -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; }