๐ป A fully interactive JavaFX Chess Game implementing complete chess mechanics, intelligent move validation, smooth graphical gameplay, and modern object-oriented architecture.
Built using Java, JavaFX, and Object-Oriented Programming principles.
โจ Interactive JavaFX GUI
โจ Complete Chess Rules Implementation
โจ Accurate Move Validation System
โจ Dynamic Piece Rendering
โจ Real-Time Check & Checkmate Detection
โจ Smooth Turn-Based Gameplay
โจ Modern Object-Oriented Architecture
โจ Professional Asset Management
โจ Beginner-Friendly Yet Scalable Code Structure
| โ Pawn Logic | โ Rook Logic | โ Knight Logic |
| โ Bishop Logic | โ Queen Logic | โ King Logic |
| โ๏ธ Piece Capturing | ๐ง Move Validation | ๐ซ Illegal Move Prevention |
| โ Check Detection | ๐ Checkmate Detection | ๐ Turn Management |
| ๐จ GUI Rendering | ๐ฑ๏ธ Mouse Interaction | โก Real-Time Updates |
| Technology | Purpose |
|---|---|
| โ Java | Core Programming Language |
| ๐จ JavaFX | GUI Development |
| ๐ง OOP | Code Architecture |
| โ๏ธ Chess Logic | Gameplay Mechanics |
| โก Event Handling | User Interaction |
| ๐ป Desktop Application | Application Environment |
JavaFX-Chess-Game/ โ โโโ src/ โ โ โ โโโ Main.java โ โ โ โโโ ASSETS/ โ โ โ โโโ board.png โ โ โ โโโ pieces/ โ โ โโโ wp.png โ โ โโโ wr.png โ โ โโโ wn.png โ โ โโโ wb.png โ โ โโโ wq.png โ โ โโโ wk.png โ โ โโโ bp.png โ โ โโโ br.png โ โ โโโ bn.png โ โ โโโ bb.png โ โ โโโ bq.png โ โ โโโ bk.png โ โ โ โโโ game_end/ โ โโโ white_wins.png โ โโโ black_wins.png โ โโโ draw.png โ โโโ PICTURES/ โ โโโ gameplay.png โ โโโ midgame.png โ โโโ checkmate.png โ โโโ README.md โโโ LICENSE โโโ .gitignore
Before running the project, install:
- โ Java JDK 17 or higher
- ๐จ JavaFX SDK
- ๐ป IntelliJ IDEA
Download JavaFX SDK from:
https://gluonhq.com/products/javafx/
After downloading:
1๏ธโฃ Extract the folder 2๏ธโฃ Remember the JavaFX SDK location
Example:
C:\javafx-sdk-24
File โ Project Structure
Go to:
Libraries โ + โ Java
Select:
javafx-sdk-24/lib
Press OK โ
Go to:
Run โ Edit Configurations
Inside VM Options, paste:
--module-path "YOUR_JAVAFX_LIB_PATH" --add-modules javafx.controls,javafx.fxml
Example:
--module-path "C:\javafx-sdk-24\lib" --add-modules javafx.controls,javafx.fxml
src/ASSETS/
Store all chess piece PNG files inside:
src/ASSETS/pieces/
Required files:
wp.png wr.png wn.png wb.png wq.png wk.png bp.png br.png bn.png bb.png bq.png bk.png
Store game result images inside:
src/ASSETS/game_end/
Required files:
white_wins.png black_wins.png draw.png
Board image location:
src/ASSETS/board.png
git clone https://github.com/Nouman-Irfan/JavaFX-Chess-Game.git
1๏ธโฃ Open IntelliJ IDEA
2๏ธโฃ Click Open
3๏ธโฃ Select project folder
4๏ธโฃ Configure JavaFX SDK
5๏ธโฃ Run Main.java
This project was developed to strengthen understanding of:
- ๐ง Object-Oriented Programming
- ๐จ GUI Development using JavaFX
- โก Event Handling
- โ๏ธ Chess Algorithms
- ๐ป Software Architecture
- ๐ Game Development
- ๐ Problem Solving
- ๐ฆ Resource Management
This project is licensed under the GNU GPL v3 License ๐


