A classic two-player chess game implementation in Java with a graphical user interface.
- Full implementation of chess rules and valid moves
- Graphical user interface for game interaction
- Save and load game functionality
- Move history tracking
- Real-time display of captured pieces
- Turn-based gameplay
- Java JDK 11 or higher
- Any Java IDE (IntelliJ IDEA recommended)
- Clone the repository
git clone https://github.com/yourusername/Chess.git-
Open the project in your IDE
-
Build and run the project
- For IntelliJ IDEA: Run the
Mainclass in thesrcdirectory - For command line:
javac src/main/java/Main.java java src/main/java/Main
- For IntelliJ IDEA: Run the
- Launch the game
- Choose to start a new game or load a saved game
- Players take turns making moves:
- Click on a piece to select it
- Valid moves will be highlighted
- Click on a valid square to move the piece
- Use the save feature to store your game progress
- The game ends when a king is checkmated
Chess/
├── src/ # Source files
├── lib/ # Dependencies
├── data/ # Save game files
├── docs/ # Documentation
└── test/ # Test files
- As a user, I want to:
- Set up a chess board with pieces
- Take turns making moves with my opponent
- Make only valid moves according to chess rules
- Track captured pieces
- Save and load game progress
- Achieve checkmate by capturing the opponent's king
The project follows object-oriented principles with a clear separation of concerns:
- Model: Chess game logic and state
- View: Graphical user interface
- Controller: Game flow and user input handling
ChessPiece(Abstract Class)BishopKnightRookKingQueenPawnEmptySpace
Each piece implements the abstract method isValidMove(Board board, Block startP, Block endP).
- Add AI opponent
- Implement online multiplayer
- Add move timer
- Include chess puzzles
- Add move suggestions for beginners
This project is licensed under the MIT License - see the LICENSE file for details.
