X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsan.cpp;h=5d5fc06c811924aeb5a7a4f2e0a37c8042cff2ac;hp=a0ff4cdd86398c7638070d6f4625eefbb41b5e1a;hb=8c9c51c721f01eaf000924f493ced2ab6bec9e91;hpb=2de78ebc7b40ff7f5155c9fd4a6a04a4b4138460 diff --git a/src/san.cpp b/src/san.cpp index a0ff4cdd..5d5fc06c 100644 --- a/src/san.cpp +++ b/src/san.cpp @@ -119,9 +119,9 @@ const std::string move_to_san(const Position& pos, Move m) { // Is the move check? We don't use pos.move_is_check(m) here, because // Position::move_is_check doesn't detect all checks (not castling moves, // promotions and en passant captures). - UndoInfo u; + StateInfo st; Position p(pos); - p.do_move(m, u); + p.do_move(m, st); if (p.is_check()) san += p.is_mate()? "#" : "+"; @@ -223,7 +223,7 @@ Move move_from_san(const Position& pos, const std::string& movestr) { toRank = rank_from_char(c); state = (i < movestr.length() - 1) ? PROMOTION_OR_CHECK : END; } - else if (state == TO_FILE && fromRank == FILE_NONE) + else if (state == TO_FILE && fromRank == RANK_NONE) { // It's a disambiguation rank instead of a file fromRank = rank_from_char(c); @@ -263,7 +263,7 @@ Move move_from_san(const Position& pos, const std::string& movestr) { return MOVE_NONE; // Look for a matching move - Move m, move; + Move m, move = MOVE_NONE; to = make_square(toFile, toRank); int matches = 0; @@ -290,7 +290,7 @@ Move move_from_san(const Position& pos, const std::string& movestr) { const std::string line_to_san(const Position& pos, Move line[], int startColumn, bool breakLines) { - UndoInfo u; + StateInfo st; std::stringstream s; std::string moveStr; size_t length = 0; @@ -309,9 +309,9 @@ const std::string line_to_san(const Position& pos, Move line[], int startColumn, s << moveStr << ' '; if (line[i] == MOVE_NULL) - p.do_null_move(u); + p.do_null_move(st); else - p.do_move(line[i], u); + p.do_move(line[i], st); } return s.str(); }