修复提交 be8139f 引入的回放历史时棋子颜色显示错乱的问题

This commit is contained in:
CalciteM Team 2019-09-15 10:35:05 +08:00
parent 499468bd04
commit 4faf1c9c4c
1 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@ Position &Position::operator= (const Position &position)
moveStep = position.moveStep;
isRandomMove = position.isRandomMove;
giveUpIfMostLose_ = position.giveUpIfMostLose_;
boardLocations = boardLocations;
boardLocations = context.board.locations;
currentLocation = position.currentLocation;
winner = position.winner;
startTime = position.startTime;
@ -125,10 +125,10 @@ bool Position::setContext(const struct Rule *rule, step_t maxStepsLedToDraw, int
// 当前棋局3×8
if (locations == nullptr) {
memset(boardLocations, 0, sizeof(boardLocations));
memset(boardLocations, 0, sizeof(context.board.locations));
context.hash = 0;
} else {
memcpy(boardLocations, locations, sizeof(boardLocations));
memcpy(boardLocations, locations, sizeof(context.board.locations));
}
// 计算盘面子数