src/chess/fen.c

changeset 223
e2519b3dd5e7
parent 221
338795f5837b
--- a/src/chess/fen.c	Mon Sep 07 17:01:21 2026 +0200
+++ b/src/chess/fen.c	Tue Sep 08 13:55:48 2026 +0200
@@ -90,7 +90,15 @@
 }
 
 static size_t fen_enpassant(char *str, const GameState *gamestate) {
-
+    /* We use the old specification where the en passant threat is always
+     * noted, regardless of a possible capture. This specification is also
+     * used by chess.com, for example. There is a modernized specification,
+     * which states that the threat is only to be noted when there is a valid
+     * capturing move for the active color (lichess.org uses this version of
+     * the specification). But this is unnecessarily complicated and as long
+     * as the old spec is still valid and commonly used, we implement the easy
+     * version.
+     */
     str[0] = '-';
 
     for (int file = 0 ; file < 8 ; file++) {
@@ -306,4 +314,4 @@
     }
 
     return 0;
-}
\ No newline at end of file
+}

mercurial