X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fuci.cpp;h=395b78a813bf4e9342a14ba44f7ef78e3ba9f6aa;hp=95d050f3bcaa66b624f159bc144ebfd4cf974f18;hb=15616ad19965444ea66896a0511f2a4d48745110;hpb=94a3608ab9f2334784ac3b111dc79c9eb5e33ba3 diff --git a/src/uci.cpp b/src/uci.cpp index 95d050f3..395b78a8 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -103,6 +103,11 @@ void UCI::loop(const string& args) { << "\n" << Options << "\nuciok" << sync_endl; + else if (token == "eval") + { + Search::RootColor = pos.side_to_move(); // Ensure it is set + sync_cout << Eval::trace(pos) << sync_endl; + } else if (token == "ucinewgame") TT.clear(); else if (token == "go") go(pos, is); else if (token == "position") position(pos, is); @@ -111,7 +116,6 @@ void UCI::loop(const string& args) { else if (token == "bench") benchmark(pos, is); else if (token == "d") sync_cout << pos.pretty() << sync_endl; else if (token == "isready") sync_cout << "readyok" << sync_endl; - else if (token == "eval") sync_cout << Eval::trace(pos) << sync_endl; else sync_cout << "Unknown command: " << cmd << sync_endl;