console: 解决输入 position fen 指令让白方先行此时输入 go 则卡住的问题

This commit is contained in:
Calcitem 2020-11-20 00:36:59 +08:00
parent b56e5c35c8
commit 0ddc151fd4
1 changed files with 3 additions and 1 deletions

View File

@ -238,6 +238,7 @@ Position &Position::set(const string &fenStr, Thread *th)
// 2. Active color
ss >> token;
sideToMove = (token == 'b' ? BLACK : WHITE);
th->us = sideToMove;
// 3. Phrase
ss >> token;
@ -1231,6 +1232,7 @@ void Position::remove_ban_stones()
inline void Position::set_side_to_move(Color c)
{
sideToMove = c;
//us = c;
them = ~sideToMove;
}