setPosition -> setGame

This commit is contained in:
CalciteM Team 2019-09-15 18:01:06 +08:00
parent 3f286f2e48
commit 3b5686414e
3 changed files with 5 additions and 5 deletions

View File

@ -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) {

View File

@ -97,7 +97,7 @@ public:
MillGameAi_ab();
~MillGameAi_ab();
void setPosition(const Game &game);
void setGame(const Game &game);
void quit()
{

View File

@ -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();