Expand description
§LazyChess
A fast, memory-efficient chess engine library for Rust.
LazyChess implements all standard FIDE rules, including castling, en passant, pawn promotion, and every draw condition (fifty-move rule, threefold repetition, insufficient material). It also supports FEN / PGN serialisation, UCI communication, an optional opening book, and move classification analysis.
§Quick start
use lazychess::Game;
let mut game = Game::new();
game.do_move("e2e4").unwrap();
game.do_move("e7e5").unwrap();
game.do_move("g1f3").unwrap(); // Nf3
println!("{}", game.display_board());
println!("Status : {}", game.get_game_status_str());
println!("FEN : {}", game.get_fen());
println!("PGN : {}", game.get_pgn());Re-exports§
pub use types::ChessError;pub use types::ChessResult;pub use types::Color;pub use types::DrawReason;pub use types::GameStatus;pub use types::Move;pub use types::MoveFlag;pub use types::Piece;pub use types::PieceType;pub use types::Square;pub use types::CastlingRights;pub use types::file_of;pub use types::rank_of;pub use types::make_square;pub use types::square_name;pub use types::parse_square;pub use board::Board;pub use game::Game;pub use movegen::generate_legal_moves;pub use movegen::is_in_check;pub use movegen::is_square_attacked;pub use movegen::apply_move;pub use fen::board_to_fen;pub use fen::parse_fen;pub use pgn::move_to_san;pub use pgn::moves_to_pgn;pub use pgn::parse_pgn;pub use opening::OpeningBook;pub use classifications::ClassificationKind;pub use classifications::MoveClassification;pub use classifications::Evaluation;pub use classifications::get_move_accuracy;pub use classifications::get_expected_points_loss;pub use analyzer::AnalyzerConfig;pub use analyzer::GameReport;pub use analyzer::MoveAnalyzer;pub use analyzer::PlayerSummary;pub use analyzer::PgnAnalysisBuilder;pub use analyzer::Side;