w-chess

Crates.iow-chess
lib.rsw-chess
version0.1.1
sourcesrc
created_at2024-03-23 11:50:04.183396
updated_at2024-03-23 11:51:49.270558
descriptionA chess library for Rust.
homepage
repositoryhttps://github.com/KorieDrakeChaney/w-chess
max_upload_size
id1183490
size91,812
Korie Drake Chaney (KorieDrakeChaney)

documentation

README

w-chess

Created for my next project of turning PGN into video. I wanted to create the chess library, so that I have full control. Of course, anyone can use this or peek through. ⭐ Star if you like ⭐

Features

  • Move generation
  • Move history
  • Checkmate detection
  • Castling
  • En passant
  • Pawn promotion
  • Draw detection
  • FEN parsing
  • PGN parsing

Usage

use w_chess::Chessboard;

fn main() {
    let board = Chessboard::new();

    // Move a piece
    board.move_to("e4");

    // Get ASCII representation of the board
    println!("{}", board.ascii());

    // Get FEN representation of the board
    println!("{}", board.fen());

    // Get all possible moves
    let moves = board.legal_moves();

    // Get history
    let history = board.history();
}
Commit count: 19

cargo fmt