pub struct MoveGenerator { /* private fields */ }Implementations§
Source§impl MoveGenerator
impl MoveGenerator
pub fn get_single_legal_move( position: &ChessPosition, from_bitboard: BitBoard, to_bitboard: BitBoard, ) -> Option<Move>
pub fn has_legal_moves( position: &ChessPosition, from_bitboard: BitBoard, to_bitboard: BitBoard, ) -> bool
pub fn new_legal(position: &ChessPosition) -> Self
Sourcepub fn reorganize_square_and_bitboard_array(&mut self)
pub fn reorganize_square_and_bitboard_array(&mut self)
The iterator portion of this struct relies on the invariant that the bitboards at the beginning of the square_and_bitboard_array[] array are the only ones used. As a result, we must partition the list such that the assumption is true.
pub fn remove_mask(&mut self, mask: BitBoard)
pub fn remove_move(&mut self, move_: Move) -> bool
pub fn get_from_bitboard_iterator_mask(&self) -> BitBoard ⓘ
pub fn set_from_bitboard_iterator_mask(&mut self, mask: BitBoard)
pub fn get_to_bitboard_iterator_mask(&self) -> BitBoard ⓘ
pub fn set_to_bitboard_iterator_mask(&mut self, mask: BitBoard)
pub fn set_iterator_masks( &mut self, from_bitboard: BitBoard, to_bitboard: BitBoard, )
pub fn perft_test(position: &ChessPosition, depth: usize) -> usize
pub fn perft_test_piecewise(position: &ChessPosition, depth: usize) -> usize
pub fn iter(&self) -> impl Iterator<Item = Move>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn contains(&self, move_: &Move) -> bool
pub fn is_legal(position: &ChessPosition, move_: &Move) -> bool
Trait Implementations§
Source§impl Clone for MoveGenerator
impl Clone for MoveGenerator
Source§fn clone(&self) -> MoveGenerator
fn clone(&self) -> MoveGenerator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MoveGenerator
impl Debug for MoveGenerator
Source§impl<'de> Deserialize<'de> for MoveGenerator
impl<'de> Deserialize<'de> for MoveGenerator
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> IntoIterator for &'a MoveGenerator
impl<'a> IntoIterator for &'a MoveGenerator
Source§impl IntoIterator for MoveGenerator
impl IntoIterator for MoveGenerator
Auto Trait Implementations§
impl Freeze for MoveGenerator
impl RefUnwindSafe for MoveGenerator
impl Send for MoveGenerator
impl Sync for MoveGenerator
impl Unpin for MoveGenerator
impl UnsafeUnpin for MoveGenerator
impl UnwindSafe for MoveGenerator
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromQuery for Twhere
T: DeserializeOwned,
impl<T> FromQuery for Twhere
T: DeserializeOwned,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more