mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 10:06:26 +08:00
Retire is_mate()
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
14
src/move.cpp
14
src/move.cpp
@@ -147,13 +147,13 @@ const string move_to_san(Position& pos, Move m) {
|
||||
}
|
||||
}
|
||||
|
||||
// The move gives check? We don't use pos.move_gives_check() here
|
||||
// because we need to test for a mate after the move is done.
|
||||
StateInfo st;
|
||||
pos.do_move(m, st);
|
||||
if (pos.in_check())
|
||||
san += pos.is_mate() ? "#" : "+";
|
||||
pos.undo_move(m);
|
||||
if (pos.move_gives_check(m, CheckInfo(pos)))
|
||||
{
|
||||
StateInfo st;
|
||||
pos.do_move(m, st);
|
||||
san += MoveList<MV_LEGAL>(pos).size() ? "+" : "#";
|
||||
pos.undo_move(m);
|
||||
}
|
||||
|
||||
return san;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user