feat: NCS-6 Implementing FEN & PGN #7

Merged
Janis merged 7 commits from feat/NCS-6-Parsing-FEN-&-PGN into main 2026-03-29 14:02:25 +02:00

7 Commits

Author SHA1 Message Date
Janis 7cdc0b8a49 feat: enhance FEN and PGN parsers with additional test cases and coverage improvements
Build & Test (NowChessSystems) TeamCity build finished
2026-03-28 19:25:47 +01:00
Janis 9b857f93ae style: replace .isDefined/.get with pattern matching in PgnParser
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 19:20:43 +01:00
Janis 58a962cf98 feat: add PGN exporter for game notation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 18:48:08 +01:00
Janis b794feb927 feat: add PGN parser with algebraic move notation
Implements PgnParser with parsePgn(), parseAlgebraicMove(), and move
resolution using geometric piece reachability with disambiguation support
for piece type, file, and rank hints.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-28 18:44:47 +01:00
Janis 219b83240e feat: add full FEN parsing with GameState support
Implements parseFen() in FenParser and gameStateToFen() in FenExporter,
covering all 6 FEN fields (piece placement, active color, castling,
en passant, half-move clock, full-move number).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 18:38:45 +01:00
Janis cc62cd22d3 feat: add FEN exporter and round-trip tests
Implements FenExporter.boardToFen() converting Board to FEN piece-placement string,
and adds three round-trip tests (initial position, empty board, partial position).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 18:33:03 +01:00
Janis 4ea3d6d30d feat: add FEN piece-placement parser
Implements FenParser.parseBoard() to parse FEN piece-placement strings
into a Board, with proper None propagation on invalid input.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 18:28:21 +01:00