- 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
- 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>