Skip to content

Rebuild chess game with tested rules and Swing UI - #3

Merged
ammaster10s merged 1 commit into
mainfrom
codex/chess-rebuild
Sep 27, 2026
Merged

ammaster10s merged 1 commit into
mainfrom
codex/chess-rebuild

Conversation

@ammaster10s

Copy link
Copy Markdown
Owner

Summary

  • Replace the prototype with a standalone chess rules engine and a refreshed Swing interface.
  • Add legal move highlighting, castling, en passant, promotion, game-end detection, clocks, move history, keyboard controls, and restart/draw/resign actions.
  • Add build/run scripts, a preview, and 10 headless rule tests.

Verification

  • ./test.sh — 10 tests passed.
  • javac -Xlint:all -encoding UTF-8 -d /tmp/chessgamejava-final-lint ChessGame.java ChessApp.java ChessGameTest.java — clean.
  • Built the runnable JAR and inspected an offscreen UI render after a move.

Known limitation

Draws by repetition and the fifty-move rule are not detected automatically.

main is protected and requires a pull request and verified commit signatures. The pushed commit is unsigned because this machine has no GitHub signing key configured.

Copilot AI lite review requested due to automatic review settings September 27, 2026 07:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

A critical timeout-result issue and a moderate promotion-history issue remain unresolved.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Rebuilds the prototype into a tested chess rules engine with a refreshed Swing UI.

Changes:

  • Adds legal moves, special moves, game-end detection, clocks, history, and controls.
  • Adds headless tests and build/run scripts.
  • Removes obsolete prototype classes and updates documentation.

Review findings:

  • ChessApp.java:445 — Critical: timeout results need a dead-position/mating-material check; 1 vote.
  • ChessApp.java:413 — Moderate: knight promotion history should use N, not K; 1 vote.
File Description
TestGraphics.java Removes prototype preview
test.sh Test runner
run.sh Application launcher
README.md Usage and project documentation
Piece.java Removes prototype piece logic
MouseMotion.java Removes prototype input handling
ImageCreater.java Removes prototype image loader
ChessGameTest.java Headless rule tests
ChessGame.java Standalone chess rules engine
Chessclock.java Removes prototype clock
Chessboard.java Removes prototype board
ChessApp.java Swing interface, clocks, and controls
build.sh Runnable JAR build script
.vscode/​settings.json Removes obsolete editor settings
.gitignore Ignores generated files

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ChessApp.java
@ammaster10s
ammaster10s merged commit 9bc82a7 into main Sep 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants