From 3a836dab59597a9f006636a362839557fe9e896b Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 12 Jan 2013 13:19:06 +0100 Subject: [PATCH] Clarify SAN disambiguation in case of a pinned piece In SAN notation when two pieces of the same type can move to a given destination square, a disambiguation additional info (like starting file) shall be added to the SAN move. If one of the two pieces is pinned, the corresponding move _could_ be illegal and in this case disambiguation is not needed. But to be pinned alone it is not enough to deduce that the move is illegal, for instance in this position: R3rk2/2r6/8/8/8/8/8/K7 b - - 0 1 The move Rc8 is ambiguous although the rook in e8 is pinned and the correct SAN notation should be Rcc8. No functional change. --- src/notation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/notation.cpp b/src/notation.cpp index 85b0abdd..bb4a713c 100644 --- a/src/notation.cpp +++ b/src/notation.cpp @@ -137,7 +137,7 @@ const string move_to_san(Position& pos, Move m) { { Square sq = pop_lsb(&attackers); - // Pinned pieces are not included in the possible sub-set + // If the move is illegal, the piece is not included in the sub-set if (!pos.pl_move_is_legal(make_move(sq, to), pos.pinned_pieces())) continue; -- 2.39.2