A simple Unicode Chess game playable in the terminal. No AI, no move restrictions, no auto-castling. Just pure manual chess.
- Java 17
- Maven
- Terminal-based GUI: Uses ANSI escape sequences for dynamic screen rendering and Unicode box-drawing characters for the board.
- Manual Movement: Pieces are moved by entering coordinates (e.g.,
e2-e4). - Raw Gameplay: Purely manual experience without enforced rule validation, allowing for sandbox-style play.
The project was built from scratch in Java. I utilized the System.console() to handle terminal interaction. The board state is managed via an 8x8 2D String array. Rendering is achieved by clearing the screen and repositioning the cursor using ANSI escape codes to draw the board grid and pieces at specific coordinates.
- ANSI Escape Sequences: Gained deep knowledge of how to manipulate the terminal cursor and clear screen areas without a traditional GUI framework.
- 2D Array Logic: Efficiently mapping board coordinates to screen positions.
- Unicode Graphics: Utilizing extended character sets to create visual elements in a text-based environment.
- Move Validation: Implement standard chess rules and piece-specific movement constraints.
- Game State Logic: Add detection for Check, Checkmate, and Stalemate.
- Special Moves: Support for Castling, En Passant, and Pawn Promotion.
- AI Opponent: Integrate a basic engine or AI for solo play.
- Compile and package the project:
mvn clean package
- Run the generated JAR:
java -cp target/unicode_chess-1.0-SNAPSHOT.jar com.aldrsze.UnicodeChess
- Navigate to the
src/main/javadirectory:cd src/main/java - Compile the source file:
javac com/aldrsze/UnicodeChess.java
- Run the application:
java com.aldrsze.UnicodeChess
Created by Aldrsze
