position: Remove incomplete flip()
This commit is contained in:
parent
fde9929a7f
commit
8c976248cb
|
@ -507,42 +507,6 @@ out:
|
|||
return k;
|
||||
}
|
||||
|
||||
/// Position::flip() flips position with the white and black sides reversed. This
|
||||
/// is only useful for debugging e.g. for finding evaluation symmetry bugs.
|
||||
|
||||
void Position::flip()
|
||||
{
|
||||
#if 0
|
||||
string f, token;
|
||||
std::stringstream ss(fen());
|
||||
|
||||
for (Rank r = RANK_8; r >= RANK_1; --r) // Piece placement
|
||||
{
|
||||
std::getline(ss, token, r > RANK_1 ? '/' : ' ');
|
||||
f.insert(0, token + (f.empty() ? " " : "/"));
|
||||
}
|
||||
|
||||
ss >> token; // Active color
|
||||
f += (token == "w" ? "B " : "W "); // Will be lowercased later
|
||||
|
||||
ss >> token; // Castling availability
|
||||
f += token + " ";
|
||||
|
||||
std::transform(f.begin(), f.end(), f.begin(),
|
||||
[](char c) { return char(islower(c) ? toupper(c) : tolower(c)); });
|
||||
|
||||
ss >> token; // En passant square
|
||||
f += (token == "-" ? token : token.replace(1, 1, token[1] == '3' ? "6" : "3"));
|
||||
|
||||
std::getline(ss, token); // Half and full moves
|
||||
f += token;
|
||||
|
||||
set(f, st, this_thread());
|
||||
|
||||
assert(pos_is_ok());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -92,7 +92,6 @@ public:
|
|||
Thread *this_thread() const;
|
||||
int rule50_count() const;
|
||||
|
||||
void flip();
|
||||
|
||||
/// Mill Game
|
||||
|
||||
|
|
|
@ -216,7 +216,6 @@ void UCI::loop(int argc, char *argv[])
|
|||
|
||||
// Additional custom non-UCI commands, mainly for debugging.
|
||||
// Do not use these commands during a search!
|
||||
else if (token == "flip") pos->flip();
|
||||
else if (token == "d") sync_cout << *pos << sync_endl;
|
||||
else if (token == "compiler") sync_cout << compiler_info() << sync_endl;
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue