Implemented module rules as a microservice.
## Summary
- Adds Quarkus to the `rule` module, making it independently deployable as a standalone microservice on port 8081
- Exposes all `RuleSet` methods via a REST API at `/api/rules` (candidate moves, legal moves, check/checkmate/stalemate/draw detection, apply
move)
- Introduces DTOs and a `DtoMapper` for serializing/deserializing chess types (board, moves, game context) as flat JSON strings
- Adds `JacksonConfig` for Scala module registration and an `application.yml` for the rule service
- Includes Dockerfiles for JVM, legacy-jar, native, and native-micro targets
- Full test coverage: 17 `@QuarkusTest` HTTP-level tests + 29 `DtoMapper` unit tests (100% condition coverage)
## Test plan
- [ ] `./compile` — all modules build successfully
- [ ] `./test` — all tests pass (rule module: 107 tests total)
- [ ] `./coverage` — 100% condition coverage in `rule` module
- [ ] Rule service runs standalone: `./gradlew :modules:rule:quarkusDev` starts on port 8081
- [ ] `GET /api/rules/candidate-moves` returns valid moves for initial position
- [ ] `GET /api/rules/is-check` returns `false` for initial position
Co-authored-by: LQ63 <lkhermann@web.de>
Co-authored-by: Janis <janis-e@gmx.de>
Reviewed-on: #36
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>