Crates.io | w-chess |
lib.rs | w-chess |
version | 0.1.1 |
source | src |
created_at | 2024-03-23 11:50:04.183396 |
updated_at | 2024-03-23 11:51:49.270558 |
description | A chess library for Rust. |
homepage | |
repository | https://github.com/KorieDrakeChaney/w-chess |
max_upload_size | |
id | 1183490 |
size | 91,812 |
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 ⭐
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();
}