chessframe/
lib.rs

1//! # chessframe
2//! chessframe is a chess library written in Rust. It provides a simple interface for working with chess positions and generating psudo-legal moves efficiently.
3//!
4//! ## Example
5//!
6//! This generates all psudo-legal moves from the starting position and makes the move "e2e4" on the board.
7//!
8//! ```rust
9//! use chessframe::{board::Board, bitboard::EMPTY, chess_move::ChessMove, piece::Piece, square::Square};
10//!
11//! let mut board = Board::default();
12//! assert_eq!(board.generate_moves_vec(!EMPTY).len(), 20);
13//!
14//! let mv = ChessMove::new(Square::E2, Square::E4);
15//!
16//! let _ = board.make_move(&mv);
17//! assert_eq!(board.get_piece(Square::E4), Some(Piece::Pawn));
18//! ```
19
20pub mod bitboard;
21pub mod board;
22pub mod castling_rights;
23pub mod chess_move;
24pub mod color;
25pub mod error;
26pub mod file;
27pub mod game;
28pub mod magic;
29pub mod piece;
30pub mod rank;
31pub mod square;
32pub mod uci;