void uci_loop(const string& args) {
- Position pos(StartFEN, false, 0); // The root position
+ Position pos(StartFEN, false, Threads.main_thread()); // The root position
string cmd, token;
while (token != "quit")
pos.print();
else if (token == "flip")
- pos.flip_me();
+ pos.flip();
else if (token == "eval")
cout << Eval::trace(pos) << endl;
else
return;
- pos.from_fen(fen, Options["UCI_Chess960"]);
+ pos.from_fen(fen, Options["UCI_Chess960"], Threads.main_thread());
// Parse move list (if any)
while (is >> token && (m = move_from_uci(pos, token)) != MOVE_NONE)
void go(Position& pos, istringstream& is) {
Search::LimitsType limits;
- std::set<Move> searchMoves;
+ vector<Move> searchMoves;
string token;
while (is >> token)
limits.ponder = true;
else if (token == "searchmoves")
while (is >> token)
- searchMoves.insert(move_from_uci(pos, token));
+ searchMoves.push_back(move_from_uci(pos, token));
}
Threads.start_searching(pos, limits, searchMoves);
int e = time.elapsed();
- std::cout << "\nNodes " << n
- << "\nTime (ms) " << e
- << "\nNodes/second " << int(n / (e / 1000.0)) << std::endl;
+ cout << "\nNodes " << n
+ << "\nTime (ms) " << e
+ << "\nNodes/second " << int(n / (e / 1000.0)) << endl;
}
}