dehlen / w-chess

A Bitboard Chess Library built in rust

Home Page:https://crates.io/crates/w-chess

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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();
}

About

A Bitboard Chess Library built in rust

https://crates.io/crates/w-chess


Languages

Language:Rust 100.0%