SAN often can also be used with pieces we don't know the moves of, e.g.
if there is only one of that type. We just always get rank or file
disambiguators if there are more (even when they might be unnecessary).
register CoordsToAlgebraicClosure *cl =
(CoordsToAlgebraicClosure *) closure;
- if (rt == cl->rt && ft == cl->ft &&
+ if ((rt == cl->rt && ft == cl->ft || rt == rf && ft == ff) && // [HGM] null move matches any toSquare
(board[rf][ff] == cl->piece
|| PieceToChar(board[rf][ff]) == '~' &&
(ChessSquare) (DEMOTED board[rf][ff]) == cl->piece)
}
*outp = NULLCHAR;
return cl.kind;
-
- /* [HGM] Always long notation for fairies we don't know */
- case WhiteFalcon:
- case BlackFalcon:
- case WhiteLance:
- case BlackLance:
- case WhiteGrasshopper:
- case BlackGrasshopper:
+
case EmptySquare:
/* Moving a nonexistent piece */
break;