A (so far) text-based Chess game written in Rust.
This project was created with the purpose of learning and practicing Rust concepts as I code, but my long-term goal is to have a fully working game, with a graphical interface, mouse support, AI engine and multiplayer functionality.
- Textual interface
- PGN movement and validations
- Basic movement
- Capture symbol support
- Disambiguation symbol support (e.g., Nfe5)
- Invalid move validation
- Castling support
- Checkmate support
- Stalemate support
- En passant support
- Tests
- Integration tests
- Unit tests
- Graphical interface and mouse support
- AI engine
- Multiplayer
- Rust 1.85+ (nightly toolchain)
Inside the project's root, run: cargo run
You will be presented with the following screen:
Turns alternate between white and black, in that order. In each turn, the game expects you to enter a PGN move, for example:
- e4 (King's pawn goes to e4)
- Nf3 (Knight goes to f3)
- Bxc4 (Bishop captures the piece on c4)
- N6e5 (the sixth-row Knight goes to e5 - assuming both Knights can go to e5)
- Nfe5 (the f-column Knight goes to e5 - assuming both Knights can go to e5)
To customize the initial board configuration, edit the file located in res/positions/initial_positions.txt.
Each line represents a given piece starting on a specific square.
The expected structure is (case-sensitive):
[Color][Piece Type][column][line]
Examples:
- WPa2: White Pawn on a2
- BRh8: Black Rook on h8
