Janis 2579539084
Build & Test (NowChessSystems) TeamCity build finished
fix(pgn): add SAN disambiguation and check/checkmate suffixes [NCS-42] (#56)
Two bugs in move notation causing PGN import failures in LiChess:

1. Disambiguation: when two pieces of same type can reach same square,
   SAN requires file/rank/full-square prefix (e.g. "Ndf3" not "Nf3").
   Added disambiguate() in PgnExporter and disambiguatePiece() in
   GameEngine, both querying allLegalMoves to find competing pieces.

2. Check/checkmate suffix: "+" and "#" were never appended.
   PgnExporter now threads ctxAfter through moveToAlgebraic and
   calls DefaultRules.isCheck/isCheckmate. GameEngine passes
   PostMoveStatus to translateMoveToNotation for the same result.

Also removes dead notation code in executeMoveBody (result was never
used — not passed to MoveExecutedEvent).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Janis Eccarius <eccariusjanis@gmail.com>
Reviewed-on: #56
2026-06-02 11:24:27 +02:00
2026-04-29 22:06:01 +02:00
2026-04-29 22:06:01 +02:00
2026-04-29 22:06:01 +02:00
2026-03-21 14:40:00 +01:00
S
Description
No description provided
1.3 GiB
Languages
Scala 82.7%
Python 12.8%
Bru 3.1%
HTML 0.9%
Shell 0.2%
Other 0.2%