}
else return;
- // Parse move list (if any)
SetupState.clear();
+ // Parse move list (if any)
while (up >> token && (m = move_from_uci(pos, token)) != MOVE_NONE)
{
SetupState.push_back(StateInfo());
- pos.do_setup_move(m, SetupState.back());
+ pos.do_move(m, SetupState.back());
}
}
string token;
SearchLimits limits;
- Move searchMoves[MAX_MOVES], *cur = searchMoves;
+ std::vector<Move> searchMoves;
int time[] = { 0, 0 }, inc[] = { 0, 0 };
while (up >> token)
up >> limits.maxTime;
else if (token == "searchmoves")
while (up >> token)
- *cur++ = move_from_uci(pos, token);
+ searchMoves.push_back(move_from_uci(pos, token));
}
- *cur = MOVE_NONE;
+ searchMoves.push_back(MOVE_NONE);
limits.time = time[pos.side_to_move()];
limits.increment = inc[pos.side_to_move()];
- return think(pos, limits, searchMoves);
+ return think(pos, limits, &searchMoves[0]);
}