- Add `postMoveStatus` batch method to `RuleSet` trait (default impl composes
individual calls; `RuleSetRestAdapter` overrides with single HTTP round-trip)
- Collapse 5 sequential rule checks in `GameEngine.executeMove` into one
`postMoveStatus` call
- Add `POST /api/rules/post-move-status` endpoint to rule-service
- Add `exportCombined` to `IoServiceClient` and `POST /io/export/combined`
endpoint to io-service, replacing two separate FEN/PGN HTTP calls
- Fix `statusOf` to pattern-match on `WinReason` from `ctx.result` instead
of making a redundant `isCheckmate` HTTP call
- Remove duplicate `legalMoves` pre-validation in `GameResource.makeMove`;
engine already validates and fires `InvalidMoveEvent`
- Add `scalafix:off` guards for pre-existing `var`/`return` usage in
`DefaultRules` hot-path code
- Apply spotless formatting to previously unformatted files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
- Added fastparse_3:3.0.2 dependency to modules/io
- Implemented FenParserFastParse as a second alternative FEN parser using FastParse, with the same public API as
FenParser and FenParserCombinators
- Parsers are built bottom-up using (using P[Any]) Scala 3 syntax with NoWhitespace.* to prevent implicit whitespace
skipping; rank sum validation uses Pass/Fail inside .flatMap
- Added FenParserFastParseTest mirroring FenParserCombinatorsTest to prove behavioural equivalence across all three
implementations
Test plan
- All existing tests pass — FenParser, FenParserCombinators, and all other modules untouched
- FenParserFastParseTest covers all cases: valid FEN, invalid color, invalid castling, invalid board shapes, en
passant, rank overflow, round-trip via FenExporter
- All parser logic branches genuinely covered — known scoverage gap documented in docs/unresolved.md (FastParse inline
macro generates synthetic proxy methods that scoverage instruments but that never execute at runtime)
Co-authored-by: LQ63 <lkhermann@web.de>
Reviewed-on: #22
Reviewed-by: Janis <janis-e@gmx.de>
Co-authored-by: Leon Hermann <lq@blackhole.local>
Co-committed-by: Leon Hermann <lq@blackhole.local>
Summary
- Added scala-parser-combinators_3:2.4.0 dependency to modules/io
- Implemented FenParserCombinators as an alternative FEN parser using RegexParsers, with the same public API as the
existing FenParser
- Parsers are built bottom-up: piece characters → rank tokens → rank → board, composed with explicit field separators
into a full FEN parser
- Added FenParserCombinatorsTest mirroring the existing FenParserTest to prove behavioural equivalence
Test plan
- All existing tests pass — FenParser and all other modules untouched
- FenParserCombinatorsTest covers all cases: valid FEN, invalid color, invalid castling, invalid board shapes, en
passant, round-trip via FenExporter
- 100% line/branch/method coverage on FenParserCombinators
Co-authored-by: LQ63 <lkhermann@web.de>
Reviewed-on: #21
Reviewed-by: Janis <janis-e@gmx.de>
Co-authored-by: Leon Hermann <lq@blackhole.local>
Co-committed-by: Leon Hermann <lq@blackhole.local>
Summary
- Curried candidateMoves, legalMoves, and applyMove in the RuleSet trait to separate (context) as the world being
operated on from the computation parameter
- Updated DefaultRules overrides and all internal call sites
- Updated all external call sites: GameEngine, PgnParser, PgnExporter, ChessBoardView, and all affected tests
Test plan
- All existing tests pass (./gradlew build)
- No behaviour changes — pure style refactoring, existing test suite is the regression guard
Co-authored-by: LQ63 <lkhermann@web.de>
Reviewed-on: #18
Reviewed-by: Janis <janis-e@gmx.de>
Co-authored-by: Leon Hermann <lq@blackhole.local>
Co-committed-by: Leon Hermann <lq@blackhole.local>