Expand description
TurboChess library
TurboChess is a move generator for chess. It supports:
- PEXT bitboards (emulated)
- Make and Undo Position
- Zobrist hashing
- FEN support
To get started, create a new Position and now you can work with legal moves
let pos: Position = Position::default(); // Loads the initial position
// Or you can also use another position
// let pos: Position = Position::from_str("r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1").unwrap();
let legals: Vec<Move> = pos.legal(); // Gets all legal moves in the position
for mv in legals {
println!("{mv}"); // Prints the move in the UCI format
}
println!("Legal count: {}", legals.count());