Commands `d` and `eval` can now also be used in xboard protocol (#47).
string f, token;
std::stringstream ss(fen());
- for (Rank r = RANK_MAX; r >= RANK_1; --r) // Piece placement
+ for (Rank r = max_rank(); r >= RANK_1; --r) // Piece placement
{
std::getline(ss, token, r > RANK_1 ? '/' : ' ');
f.insert(0, token + (f.empty() ? " " : "/"));
#include <iostream>
#include <string>
+#include "evaluate.h"
#include "search.h"
#include "thread.h"
#include "types.h"
is >> perft_limits.perft;
go(pos, perft_limits, states);
}
+ else if (token == "d")
+ sync_cout << pos << sync_endl;
+ else if (token == "eval")
+ sync_cout << Eval::trace(pos) << sync_endl;
// Move strings and unknown commands
else
{