pub struct Board { /* private fields */ }
Expand description
Implementations
sourceimpl Board
impl Board
pub fn new() -> Board
pub fn empty() -> Board
pub fn racing_kings() -> Board
pub fn horde() -> Board
pub fn occupied(&self) -> Bitboard
pub fn pawns(&self) -> Bitboard
pub fn knights(&self) -> Bitboard
pub fn bishops(&self) -> Bitboard
pub fn rooks(&self) -> Bitboard
pub fn queens(&self) -> Bitboard
pub fn kings(&self) -> Bitboard
pub fn white(&self) -> Bitboard
pub fn black(&self) -> Bitboard
pub fn promoted(&self) -> Bitboard
pub fn rooks_and_queens(&self) -> Bitboard
pub fn bishops_and_queens(&self) -> Bitboard
sourcepub fn king_of(&self, color: Color) -> Option<Square>
pub fn king_of(&self, color: Color) -> Option<Square>
The (unique, unpromoted) king of the given side.
pub fn color_at(&self, sq: Square) -> Option<Color>
pub fn role_at(&self, sq: Square) -> Option<Role>
pub fn piece_at(&self, sq: Square) -> Option<Piece>
pub fn remove_piece_at(&mut self, sq: Square) -> Option<Piece>
pub fn discard_piece_at(&mut self, sq: Square)
pub fn set_piece_at(&mut self, sq: Square, _: Piece, promoted: bool)
pub fn by_color(&self, color: Color) -> Bitboard
pub fn by_role(&self, role: Role) -> Bitboard
pub fn by_piece(&self, piece: Piece) -> Bitboard
pub fn attacks_from(&self, sq: Square) -> Bitboard
pub fn attacks_to(
&self,
sq: Square,
attacker: Color,
occupied: Bitboard
) -> Bitboard
pub fn pieces(&self) -> PiecesⓘNotable traits for Piecesimpl Iterator for Pieces type Item = (Square, Piece);
pub fn material_side(&self, color: Color) -> MaterialSide
pub fn material(&self) -> Material
Trait Implementations
sourceimpl Extend<(Square, Piece)> for Board
impl Extend<(Square, Piece)> for Board
sourcefn extend<T: IntoIterator<Item = (Square, Piece)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (Square, Piece)>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl FromIterator<(Square, Piece)> for Board
impl FromIterator<(Square, Piece)> for Board
sourceimpl FromStr for Board
impl FromStr for Board
type Err = ParseFenError
type Err = ParseFenError
The associated error which can be returned from parsing.
impl Eq for Board
impl StructuralEq for Board
impl StructuralPartialEq for Board
Auto Trait Implementations
impl RefUnwindSafe for Board
impl Send for Board
impl Sync for Board
impl Unpin for Board
impl UnwindSafe for Board
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more