X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fnotation.cpp;h=d5a263c11bc94afbfe47e6428356805e5287e95f;hb=aa60c80adec4d537c5dbd8d60b3d08ce0a807d9a;hp=a2d898adf3e21289a17e477ca45111afab2171fe;hpb=5cbcff55cc3a2ff78dd83e7a3f94c5414946f82c;p=stockfish diff --git a/src/notation.cpp b/src/notation.cpp index a2d898ad..d5a263c1 100644 --- a/src/notation.cpp +++ b/src/notation.cpp @@ -21,8 +21,8 @@ #include #include "movegen.h" -#include "notation.h" #include "position.h" +#include "uci.h" using namespace std; @@ -36,7 +36,7 @@ static const char* PieceToChar[COLOR_NB] = { " PNBRQK", " pnbrqk" }; /// mate Mate in y moves, not plies. If the engine is getting mated /// use negative values for y. -string score_to_uci(Value v, Value alpha, Value beta) { +string UCI::score_to_uci(Value v, Value alpha, Value beta) { stringstream ss; @@ -56,7 +56,7 @@ string score_to_uci(Value v, Value alpha, Value beta) { /// in the e1g1 notation in normal chess mode, and in e1h1 notation in chess960 /// mode. Internally castling moves are always encoded as "king captures rook". -const string move_to_uci(Move m, bool chess960) { +const string UCI::move_to_uci(Move m, bool chess960) { Square from = from_sq(m); Square to = to_sq(m); @@ -82,7 +82,7 @@ const string move_to_uci(Move m, bool chess960) { /// move_from_uci() takes a position and a string representing a move in /// simple coordinate notation and returns an equivalent legal Move if any. -Move move_from_uci(const Position& pos, string& str) { +Move UCI::move_from_uci(const Position& pos, string& str) { if (str.length() == 5) // Junior could send promotion piece in uppercase str[4] = char(tolower(str[4]));