Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unicode Chess

A simple Unicode Chess game playable in the terminal. No AI, no move restrictions, no auto-castling. Just pure manual chess.

Presentation

Chess screenshot

Technologies

  • Java 17
  • Maven

Features

  • 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.

How I Built It

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.

What I Learned

  • 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.

Future Enhancements

  • 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.

How to Run the Project

Using Maven

  1. Compile and package the project:
    mvn clean package
  2. Run the generated JAR:
    java -cp target/unicode_chess-1.0-SNAPSHOT.jar com.aldrsze.UnicodeChess

Using Standard Java Commands

  1. Navigate to the src/main/java directory:
    cd src/main/java
  2. Compile the source file:
    javac com/aldrsze/UnicodeChess.java
  3. Run the application:
    java com.aldrsze.UnicodeChess

Created by Aldrsze

About

Simple Unicode Chess in terminal. No AI, No move Restrictions, No Auto Castling, and etc. Just pure manual chess in terminal.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages