A fully playable console-based Chess game written in Java. The game features a clean terminal UI, a working move history, basic AI for black pieces, and full implementation of chess rules including castling, pawn promotion, en passant, and checkmate detection.
This project was created to demonstrate:
- Object-oriented principles in Java
- Practical use of polymorphism, encapsulation, and inheritance through a full set of chess piece classes
- A turn-based console UI system
- Game state management including move validation, win/loss conditions, and basic AI simulation
- Clone or download this repository.
- Open the project in your Java IDE (e.g., IntelliJ or Eclipse).
- Run the
main()
method from theMain.java
file. - Follow the terminal prompts:
- Choose whether to start a new game or exit
- Select pieces by entering positions (e.g.,
C2
) - Choose where to move based on highlighted legal moves
- Continue playing until checkmate or stalemate
The terminal interface will guide you clearly throughout gameplay.
There are no special dependencies required for this project.
- Built with Java 17+
- Uses only standard Java libraries
To run the program:
- Open and execute
Main.java
in your IDE - The console will launch the game interface