A fully-featured chess game implemented in Java, offering a classic two-player offline experience with complete chess rules and mechanics.
- Complete chess piece movement validation
- Turn-based gameplay system
- Checkmate detection
- Special moves implementation:
- Pawn promotion
- Castling
- En-passant capture
- Chess.com inspired GUI interface built with Java Swing
- Object-Oriented Programming architecture
- Java Development Kit (JDK) installed on your system
- Java Runtime Environment (JRE)
- Clone this repository or download all files
- Keep the file structure intact, ensuring the
imagesfolder and all.javafiles remain in their original locations - Open a terminal or command prompt in the project directory
- Compile the program:
javac Main.java- Run the compiled program:
java MainMain.java- Entry point of the applicationChessBoard.java- Handles the chess board logicChessUI.java- Contains the user interface implementationPiece.java- Base class for chess pieces- Individual piece classes:
Bishop.javaKing.javaKnight.javaPawn.javaQueen.javaRook.java
- Launch the game
- White pieces move first
- Click on a piece to select it
- Click on a valid destination square to move
- Game continues until checkmate or stalemate
- Built using Object-Oriented Programming principles
- Java Swing for graphical user interface
- Modular design with separate classes for pieces and game logic
- UI design inspired by Chess.com
Feel free to fork this project and submit pull requests for any improvements you'd like to add. Please make sure to test your changes thoroughly before submitting.
Created by Prem Kotadiya & Nandit Kalaria.
For questions or issues, please open an issue in the GitHub repository.