diff --git a/src/ai/search.cpp b/src/ai/search.cpp index 4e6e1128..71534133 100644 --- a/src/ai/search.cpp +++ b/src/ai/search.cpp @@ -257,7 +257,7 @@ void MillGameAi_ab::deleteTree(Node *node) #endif } -void MillGameAi_ab::setPosition(const Game &game) +void MillGameAi_ab::setGame(const Game &game) { // 如果规则改变,重建hashmap if (strcmp(this->position_.currentRule.name, game.currentRule.name) != 0) { diff --git a/src/ai/search.h b/src/ai/search.h index 36be057f..e4580720 100644 --- a/src/ai/search.h +++ b/src/ai/search.h @@ -97,7 +97,7 @@ public: MillGameAi_ab(); ~MillGameAi_ab(); - void setPosition(const Game &game); + void setGame(const Game &game); void quit() { diff --git a/src/base/thread.cpp b/src/base/thread.cpp index cbc5e8fd..a9707bb1 100644 --- a/src/base/thread.cpp +++ b/src/base/thread.cpp @@ -66,7 +66,7 @@ void AiThread::setAi(const Game &game) mutex.lock(); this->position_ = &game; - ai_ab.setPosition(*(this->position_)); + ai_ab.setGame(*(this->position_)); #ifdef TRANSPOSITION_TABLE_ENABLE // 新下一盘前清除哈希表 (注意可能同时存在每步之前清除) @@ -82,7 +82,7 @@ void AiThread::setAi(const Game &game, depth_t depth, int time) { mutex.lock(); this->position_ = &game; - ai_ab.setPosition(game); + ai_ab.setGame(game); aiDepth = depth; aiTime = time; mutex.unlock(); @@ -116,7 +116,7 @@ void AiThread::run() continue; } - ai_ab.setPosition(*position_); + ai_ab.setGame(*position_); emit calcStarted(); mutex.unlock();