Skip to content

Tabish5858/ChessEngine

Chess Engine in Java

Java CI License Last Commit Issues Stars

A desktop chess engine and GUI application built with Java Swing. It includes move validation, game history, configurable board visuals, and login/registration flow backed by SQLite.

Table of Contents

Highlights

  • Swing chess UI with legal move highlighting
  • Piece move engine for standard chess rules
  • Board preferences menu for tile colors and piece themes
  • Move history and captured pieces side panels
  • SQLite-backed user login and registration

Screenshots

Login screen Game start screen

Preferences menu Mid-game board

Project Layout

Chess-Engine-In-Java/
|- JChess/
|  |- run_chess.sh
|  |- chess.db
|  |- src/com/chess/
|  |  |- JChess.java
|  |  |- engine/
|  |  |- gui/
|  |- art/
|- docs/screenshots/
|- .github/

Run Locally

Prerequisites

  • macOS, Linux, or Windows with Java 17+
  • javac and java available on PATH

Option A: Quick Start (recommended)

cd JChess
./run_chess.sh

If script execution is blocked:

cd JChess
chmod +x run_chess.sh
./run_chess.sh

Option B: Manual Compile and Run

cd JChess
javac -cp ".:guava-19.0.jar:sqlite-jdbc-3.36.0.3.jar" -d out -sourcepath src src/com/chess/JChess.java
java -cp "out:guava-19.0.jar:sqlite-jdbc-3.36.0.3.jar" com.chess.JChess

If your machine defaults to an older Java version, set Java 17 first:

export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
java -version

Default Test Login

  • Username: test
  • Password: test

Troubleshooting

  • App does not launch: verify Java 17 with java -version.
  • Compile errors about missing classes: make sure the JAR files exist inside JChess/.
  • Database/login issues: confirm JChess/chess.db exists and is readable.
  • Images not visible: verify files are present under JChess/art/.

Contributing

Please follow CONTRIBUTING.md for setup, coding standards, and PR checklist.

Code of Conduct

Please review CODE_OF_CONDUCT.md.

Security

For responsible disclosure, follow SECURITY.md.

Support

For support channels and issue types, see SUPPORT.md.

License

This project is licensed under the MIT License. See LICENSE.

About

A comprehensive Java chess engine with a Swing GUI, featuring move generation, board representation, and optional user authentication via MySQL

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors