pub struct Bitboard(pub u64);Tuple Fields§
§0: u64Implementations§
Source§impl Bitboard
Bitboard Set API.
impl Bitboard
Bitboard Set API.
pub const fn clear(&mut self)
pub const fn contains(self, square: Square) -> bool
pub const fn difference(self, squares: Bitboard) -> Bitboard
pub const fn eq(self, other: Self) -> bool
pub const fn first(self) -> Option<Square>
pub const fn insert(&mut self, square: Square) -> bool
pub const fn intersection(self, squares: Bitboard) -> Bitboard
pub const fn is_disjoint(self, other: Bitboard) -> bool
pub const fn is_empty(self) -> bool
pub const fn is_subset(self, other: Bitboard) -> bool
pub const fn is_superset(self, other: Bitboard) -> bool
pub const fn iter(self) -> IntoIter
pub const fn last(self) -> Option<Square>
pub const fn len(self) -> usize
pub const fn pop_first(&mut self) -> Option<Square>
pub const fn pop_last(&mut self) -> Option<Square>
pub const fn remove(&mut self, square: Square) -> bool
pub const fn symmetric_difference(self, squares: Bitboard) -> Bitboard
pub const fn union(self, squares: Bitboard) -> Bitboard
Source§impl Bitboard
Set extensions
impl Bitboard
Set extensions
pub const fn more_than_one(self) -> bool
Sourcepub const fn next_subset(self, set: Bitboard) -> Bitboard
pub const fn next_subset(self, set: Bitboard) -> Bitboard
Returns the next subset of self after set, wrapping back to empty.
set is expected to be a subset of self.
pub const fn set(&mut self, square: Square, set: bool)
pub const fn with(self, square: Square) -> Bitboard
pub const fn without_first(self) -> Bitboard
Source§impl Bitboard
Bitboard Geometry API.
impl Bitboard
Bitboard Geometry API.
pub const fn checked_shift(self, direction: Direction) -> Bitboard
Sourcepub const fn flip_anti_diagonal(self) -> Bitboard
pub const fn flip_anti_diagonal(self) -> Bitboard
Mirror at h1-a8 diagonal
Sourcepub const fn flip_diagonal(self) -> Bitboard
pub const fn flip_diagonal(self) -> Bitboard
Mirror at a1-h8 diagonal
pub const fn flip_horizontal(self) -> Bitboard
pub const fn flip_vertical(self) -> Bitboard
pub const fn rotate_180(self) -> Bitboard
pub const fn rotate_270(self) -> Bitboard
pub const fn rotate_90(self) -> Bitboard
pub const fn without_a_file(self) -> Bitboard
pub const fn without_ab_files(self) -> Bitboard
pub const fn without_gh_files(self) -> Bitboard
pub const fn without_h_file(self) -> Bitboard
Source§impl Bitboard
Constants
impl Bitboard
Constants
pub const ANTIDIAGONAL: Bitboard
pub const BACKRANKS: Bitboard
pub const BLACK: Bitboard
pub const CENTER: Bitboard
pub const CORNERS: Bitboard
pub const DIAGONAL: Bitboard
pub const EAST: Bitboard
pub const EMPTY: Bitboard
pub const FILE_A: Bitboard
pub const FULL: Bitboard
pub const FULL_RAYS: [[Bitboard; 64]; 64]
pub const NORTH: Bitboard
pub const SOUTH: Bitboard
pub const WEST: Bitboard
pub const WHITE: Bitboard
Trait Implementations§
Source§impl<T> BitAndAssign<T> for Bitboard
impl<T> BitAndAssign<T> for Bitboard
Source§fn bitand_assign(&mut self, rhs: T)
fn bitand_assign(&mut self, rhs: T)
Performs the
&= operation. Read moreSource§impl<T> BitOrAssign<T> for Bitboard
impl<T> BitOrAssign<T> for Bitboard
Source§fn bitor_assign(&mut self, rhs: T)
fn bitor_assign(&mut self, rhs: T)
Performs the
|= operation. Read moreSource§impl<T> BitXorAssign<T> for Bitboard
impl<T> BitXorAssign<T> for Bitboard
Source§fn bitxor_assign(&mut self, rhs: T)
fn bitxor_assign(&mut self, rhs: T)
Performs the
^= operation. Read moreimpl Copy for Bitboard
impl Eq for Bitboard
Source§impl Extend<Square> for Bitboard
impl Extend<Square> for Bitboard
Source§fn extend<T: IntoIterator<Item = Square>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Square>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn 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.
Source§fn 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
Source§impl FromIterator<Square> for Bitboard
impl FromIterator<Square> for Bitboard
Source§impl IntoIterator for Bitboard
impl IntoIterator for Bitboard
Source§impl Ord for Bitboard
impl Ord for Bitboard
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Bitboard
impl PartialOrd for Bitboard
impl StructuralPartialEq for Bitboard
Auto Trait Implementations§
impl Freeze for Bitboard
impl RefUnwindSafe for Bitboard
impl Send for Bitboard
impl Sync for Bitboard
impl Unpin for Bitboard
impl UnsafeUnpin for Bitboard
impl UnwindSafe for Bitboard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more