Commit Graph

37 Commits

Author SHA1 Message Date
LQ63 62e180c6d9 refactor: migrate GameController to GameContext (signatures only)
Build & Test (NowChessSystems) TeamCity build finished
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 13:04:57 +01:00
LQ63 c9a59d3ad1 feat: migrate GameRules.gameStatus to GameContext; add false-stalemate test
- gameStatus now accepts GameContext instead of Board so legalMoves
  (which already requires GameContext for castling) is called directly
  without discarding castling rights
- All four existing gameStatus call sites in GameRulesTest migrated to ctx(...)
- New test: castling as sole legal move returns Normal, not Drawn
- GameController.processMove updated to wrap newBoard in GameContext at
  the gameStatus call site (full ctx propagation deferred to Task 6)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 12:59:10 +01:00
LQ63 417a475d84 feat: include castling moves in GameRules.legalMoves
Switch legalMoves to the context-aware MoveValidator.legalTargets(ctx, from)
so castling destinations are included, and simulate castle moves via withCastle
when filtering for self-check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 12:55:00 +01:00
LQ63 7c568581a7 refactor: migrate GameRules.legalMoves signature to GameContext
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 12:51:14 +01:00
LQ63 ffe663a62e feat: add castling logic to MoveValidator (castlingTargets + context-aware overloads)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 12:44:51 +01:00
LQ63 3c8297e1c3 feat: add GameContext, CastleSide, and Board.withCastle
Introduces GameContext (board + per-side CastlingRights), CastleSide enum,
and a Board.withCastle extension method. Also pins missing verification
checksums for com.fasterxml:oss-parent:41 and org.junit:junit-bom:5.9.2.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 12:31:01 +01:00
LQ63 38a68549f5 docs: add castling implementation plan (TDD, 9 tasks)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 11:07:51 +01:00
LQ63 205ade8d88 docs: update castling design spec (rev 2 — spec review fixes)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 10:47:26 +01:00
LQ63 b6ab8ed6ac docs: add castling design spec
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 10:39:03 +01:00
Janis 7662b8ea10 feat: add new trusted keys to verification keyring and metadata
Build & Test (NowChessSystems) TeamCity build failed
2026-03-23 22:46:44 +01:00
Janis aedd787b77 fix: add missing kings to gameLoop capture test board 2026-03-23 22:37:15 +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 f0481e2561 fix: correct test board positions and captureOutput/withInput interaction
- Add BlackKing/WhiteKing to capture board in 'legal capture returns Moved'
  so the position is not treated as stalemate after the capture.
- Move WhiteKing from A3 to C3 in three MovedInCheck tests so it no
  longer blocks the rook's path along file A.
- Remove Console.withOut(System.out) from withInput so it no longer
  overrides the ByteArrayOutputStream installed by captureOutput.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 22:32:51 +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 13ac90a42f test: add failing GameControllerTest cases for check/checkmate/stalemate
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 22:16:53 +01:00
Janis 8b7ec57e5e feat: add MovedInCheck/Checkmate/Stalemate MoveResult variants (stub dispatch)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 21:48:32 +01:00
Janis 94a02ff684 feat: implement GameRules with isInCheck, legalMoves, gameStatus
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 21:42:21 +01:00
Janis 86552b52bd test: add failing GameRulesTest for check/checkmate/stalemate
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 21:34:24 +01:00
Janis 76d4168038 feat: add GameRules stub with PositionStatus enum 2026-03-23 21:29:41 +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 057cbd6bb9 build: add SonarQube configuration for code quality analysis 2026-03-22 21:07:11 +01:00
Janis 2f1d61ca9b docs: add installation instructions for new skills in Claude 2026-03-22 19:08:41 +01:00
Janis fe39d27d91 test: add unit test for clean exit on 'quit' command in Main 2026-03-22 15:31:02 +01:00
Janis 551e08cef3 build: migrate to ScalaTest and Scoverage, replacing JaCoCo across modules 2026-03-22 15:28:02 +01:00
Janis 5a21e57ca9 chore: Update build configuration for Scoverage and ScalaTest integration 2026-03-22 14:19:44 +01:00
Janis 186db062c1 build: add ScalaTest version entries to root versions map 2026-03-22 13:15:25 +01:00
Janis 51b210e9eb chore: Update documentation and improve test writing guidelines 2026-03-22 11:47:20 +01:00
Janis a8abd69e0e chore: Add initial implementation of move validation logic and game controller 2026-03-21 21:26:37 +01:00
Janis 1f1d3b670f chore: Refactor chess logic to MVC pattern and enhance board representation 2026-03-21 20:37:33 +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 a8d457a612 chore: Configure Scala build with dependencies and project structure 2026-03-21 15:52:51 +01:00
Janis 227d0a4719 chore: Update documentation to reference the correct API directory 2026-03-21 15:35:46 +01:00
Janis 5ecc70f5a0 chore: Add initial architecture decision records and project documentation 2026-03-21 15:31:52 +01:00
Janis 0d6935e184 chore: Initial Commit 2026-03-21 14:40:00 +01:00