sacrifice
A feature-rich chess library for Rust based on shakmaty.
Example
let mut game = from_pgn;
println!; // exports the PGN string
// Play the Open Sicilian
let open_sicilian = Normal ;
let new_node = game.add_node;
println!; // exports the PGN string after 2. Nf3
// Take back 2. Nf3 move
game.remove_node;
println!;
// What if someone want to play 1. d4?
let queens_pawn = Normal ;
let new_node = game.add_node;
println!; // 1. e4 (1. d4) 1... c5
// Promote 1. d4
game.promote_variation;
println!; // 1. d4 (1. e4 c5)
Features
Currently it supports
- PGN se/deserialization
- Comments
- NAG notations