修复提交 be8139f
引入的回放历史时棋子颜色显示错乱的问题
This commit is contained in:
parent
499468bd04
commit
4faf1c9c4c
|
@ -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));
|
||||
}
|
||||
|
||||
// 计算盘面子数
|
||||
|
|
Loading…
Reference in New Issue