项目作者: ahmedelahwany
项目描述 :
a complete Chess game written in Java with GUI (javaFx) with AI
高级语言: Java
项目地址: git://github.com/ahmedelahwany/Full-Chess-Game.git
Chess App With AI
2 player Full Chess Game with GUI (JavaFx) implemented from scratch based on MVC pattern .
AI has been integrated to create a chess engine
Table of Contents
Features
This is a complete Chess game written in Java with GUI ; It has been tested by playing tons of games and it works very well.
It strictly follows the Chess rules according to this handbook made by FIDE for chess Laws and have the following features:
- Regular moves and captures of Pawn, Bishop, Rook, Knight, Queen and King.
- Moves like En Passant, Castling (Queen and King Side) and Pawn promotion.
- Highlighting possible moves (any illegal moves according to the rules are excluded) when any piece is clicked which assist beginner players to know which to play.
- Disallowing any illegal moves ( ex. moving pinned pieces, illegal castling, moving kings to attacked cells)
- All game states (Check , CheckMate, StaleMate and TimeOut) are included in the game logic
GUI features
- Chess Clock (Custom minutes per side and Increment in seconds)
- Move Logger following the chess moves’ notations rules
- Buttons for claiming Draw and Resignations.
AI
Players can choose to play against an elementary chess engine
Features
The engine uses MinMax , alpha beta with Quiescence search and iterative deepening as search algorithms.
Evaluation of a board position (heuristics) are based on the following :
- Material Balance
- Pawn Structure (isolated pawns , double pawns , backward pawns)
- Bishop pairs
- King-related evaluations (check ,checkmate , castling availability)
- Mobility (number of available moves and and number of attack moves)
Demo
- This is a Demo of two players playing a timed game

- Picture showing checkmate state.

Technologies
- Maven
- JavaFX
- JUnit5
- MySQL
- H2 DB Engine
- JPA
- Log4J
- Lombok
- JavaDoc Plugin
- Checkstyle Plugin
- MVC
Install
run the following commands:
git clone https://github.com/ahmedelahwany/Full-Chess-Game.git
cd Full-Chess-Game
mvn install
Run
run the following commands in the project directory
mvn package
java -jar ./target/Full-Chess-Game-1.0.jar
Upcoming
- AI enhancement and integrating AI with GUI
- Provide unit tests for AI
License