Skip to content

vhborges/rusty-chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rusty Chess

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.

Roadmap

  • 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

Requirements

  • Rust 1.85+ (nightly toolchain)

Running & playing

Inside the project's root, run: cargo run

You will be presented with the following screen:

image

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)

Customization

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

About

A terminal-based Chess game written in Rust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages