Welcome to Kotlin Chess Game, a fully-featured command-line chess game that is implemented in Kotlin language. This chess game features a wide range of features such as Check, Checkmate, Stalemate, complete piece movement logic, and pawn en passant logic. It is a perfect choice for anyone who wants to play chess on their terminal or anyone who wants to learn more about the game of chess.
- Check logic
- Checkmate logic
- Stalemate logic
- All piece movement logic (King, Queen, Rook, Bishop, Knight, and Pawn)
- Pawn en passant logic
To run this chess game on your system, you need to install Java 11 or higher and Kotlin 1.5 or higher. You can download the latest version of these tools from the official websites.
Run the game using the following command:
./gradlew run --quiet --console=plain
You can build and run the .jar locally:
./gradlew fatJar
java -jar build/libs/KCL-Chess.jar
Or, you can download the pre-compiled .jar from the releases page page.
The game is played in the terminal, and you will see the chess board on your screen. You can make moves by entering the
starting and ending coordinates of the piece you want to move. For example, if you want to move the piece at the "a2"
square to the "a3" square, you would enter a2a3
.
The game will prompt you to make moves, and you can enter your move as described above. The game will continue until either a player wins by putting the other player in checkmate, or the game ends in a stalemate. See Chess Piece Movement
I did basic movement tests, there is no value to make more for a command line game of chess... when chess.com exists!