Commit Graph

18 Commits

Author SHA1 Message Date
Janis c10a4d7e64 feat(bot): implement bot architecture with difficulty levels and game context handling 2026-04-28 00:59:32 +02:00
Janis f088c4e9ff feat: NCS-37 Quarkus integration (#35)
Reviewed-on: #35
Reviewed-by: Leon Hermann <lq@blackhole.local>
2026-04-21 12:35:20 +02:00
lq64 9ad11fb97a docs: NCS-36 Added an API spec for Now Chess (#25)
Build & Test (NowChessSystems) TeamCity build finished
## Summary
  - Adds `docs/api-spec.yaml` — a full OpenAPI 3.0.3 specification for the NowChess REST API
  - Endpoint paths follow the lichess `board/bot` split convention (`/api/board/game/...`)
    to leave room for a future bot API under `/api/bot/game/...`
  - Covers game lifecycle, move-making, draw handling, undo/redo,
    legal move introspection, and FEN/PGN import/export

  ## Endpoints
  - Game: POST /api/board/game, GET /{gameId}, GET /{gameId}/stream, POST /{gameId}/resign
  - Move: POST /{gameId}/move/{uci}, GET /{gameId}/moves, POST /{gameId}/undo, POST /{gameId}/redo
  - Draw: POST /{gameId}/draw/{action}
  - Import: POST /import/fen, POST /import/pgn
  - Export: GET /{gameId}/export/fen, GET /{gameId}/export/pgn

  ## Test plan
  - [ ] Open docs/api-spec.yaml in Swagger Editor (https://editor.swagger.io) — zero validation errors expected
  - [ ] Verify every endpoint maps to an existing GameEngine or RuleSet method

Co-authored-by: LQ63 <lkhermann@web.de>
Reviewed-on: #25
Reviewed-by: Janis <janis-e@gmx.de>
Co-authored-by: Leon Hermann <lq@blackhole.local>
Co-committed-by: Leon Hermann <lq@blackhole.local>
2026-04-12 17:15:11 +02:00
lq64 7a045d31d7 feat: NCS-31 FastParse FEN (#22)
Build & Test (NowChessSystems) TeamCity build finished
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>
2026-04-08 09:32:57 +02:00
Janis 8959c3a849 refactor: NCS-24 update CLAUDE.md for improved structure and clarity (#20)
Build & Test (NowChessSystems) TeamCity build finished
Reviewed-on: #20
Reviewed-by: Leon Hermann <lq@blackhole.local>
Co-authored-by: Janis <janis-e@gmx.de>
Co-committed-by: Janis <janis-e@gmx.de>
2026-04-07 12:25:33 +02:00
Janis 13bfc16cfe feat: NCS-10 Implement Pawn Promotion (#12)
Build & Test (NowChessSystems) TeamCity build finished
Reviewed-on: #12
Reviewed-by: Leon Hermann <lq@blackhole.local>
Co-authored-by: Janis <janis-e@gmx.de>
Co-committed-by: Janis <janis-e@gmx.de>
2026-03-31 22:18:14 +02:00
Janis 11efb1a42d docs: remove outdated JUnitSuiteLike issue from unresolved.md
Build & Test (NowChessSystems) TeamCity build finished
2026-03-24 18:12:53 +01:00
lq64 00d326c1ba feat: implement legal castling (#1)
Build & Test (NowChessSystems) TeamCity build finished
## Summary

  - Introduces `GameContext` wrapper (board + castling rights) threading through the entire engine pipeline
  - Extends `MoveValidator` with `castlingTargets`, context-aware `legalTargets`/`isLegal` overloads, and helpers (`isCastle`, `castleSide`)
  - Updates `GameRules.legalMoves` and `gameStatus` to use `GameContext`, preventing false stalemate when castling is the only legal move
  - Adds castle detection and atomic execution (`withCastle`) to `GameController.processMove`, plus full rights revocation via source- and
  destination-square tables

  ## Test Plan

  - [ ] 142 tests passing, 100% statement and branch coverage on `modules/core`
  - [ ] White/Black kingside (e1g1/e8g8) and queenside (e1c1/e8c8) castling moves execute correctly
  - [ ] All six legality conditions enforced (rights flags, home squares, empty transit, king not in check, transit/landing squares not attacked)
  - [ ] Rights revoked on king moves, own rook moves, castle moves, and enemy rook captures
  - [ ] False stalemate correctly prevented when castling is the only escape

Co-authored-by: LQ63 <lkhermann@web.de>
Co-authored-by: Janis <janis.e.20@gmx.de>
Reviewed-on: #1
Reviewed-by: Janis <janis-e@gmx.de>
Co-authored-by: Leon Hermann <lq@blackhole.local>
Co-committed-by: Leon Hermann <lq@blackhole.local>
2026-03-24 17:55:00 +01:00
Janis d67615235b docs: remove resolved test bug entry from unresolved.md
The three GameControllerTest bugs described in the entry have been fixed
by the test-writer agent; the file contained no other entries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 22:32:59 +01:00
Janis 5264a22541 feat: wire check/checkmate/stalemate into processMove and gameLoop
Replace stub branches with GameRules.gameStatus dispatch in processMove
and fill in MovedInCheck/Checkmate/Stalemate cases in gameLoop.
Document 6 pre-existing test bugs in docs/unresolved.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 22:30:09 +01:00
Janis b3cb1eba04 docs: add implementation plan for check/checkmate/stalemate 2026-03-23 20:45:45 +01:00
Janis c354b77f88 docs: fix test positions in chess check/checkmate/stalemate spec 2026-03-23 20:16:56 +01:00
Janis 2b2f64695e docs: add design spec for check/checkmate/stalemate implementation 2026-03-23 20:09:26 +01:00
Janis 7228da3a68 docs: add security guidelines for library key verification and metadata 2026-03-22 22:03:01 +01:00
Janis 2f1d61ca9b docs: add installation instructions for new skills in Claude 2026-03-22 19:08:41 +01:00
Janis 551e08cef3 build: migrate to ScalaTest and Scoverage, replacing JaCoCo across modules 2026-03-22 15:28:02 +01:00
Janis 9c2456e928 chore: Set up shared-models library and initial project structure for NowChessSystems 2026-03-21 17:07:28 +01:00
Janis 5ecc70f5a0 chore: Add initial architecture decision records and project documentation 2026-03-21 15:31:52 +01:00