pub struct MoveVec { /* private fields */ }Expand description
MoveVec implements MoveAdder and collects moves in a vector.
Use iter to access the moves once they have been added.
Implementations§
Trait Implementations§
Source§impl MoveAdder for MoveVec
impl MoveAdder for MoveVec
fn add_captures(&mut self, from: Square, targets: BB)
fn add_non_captures(&mut self, from: Square, targets: BB)
Source§fn add_castle(&mut self, castle: Castle)
fn add_castle(&mut self, castle: Castle)
Adds the castle to the move list
Source§fn add_pawn_ep_capture(&mut self, from: Square, to: Square)
fn add_pawn_ep_capture(&mut self, from: Square, to: Square)
Adds pawn en-passant capture to list. From and to are the squares the moving pieces moves from and to, respectively
Source§fn add_pawn_pushes(&mut self, shift: usize, targets: BB)
fn add_pawn_pushes(&mut self, shift: usize, targets: BB)
Adds pawn non-captures to the list. Targets is a bitboard of valid to-squares. Shift is the distance the pawn moved to get to the target square, mod 64. For example, for a white piece moving forward one row this is ‘8’. For a black piece moving forward one row this is 56 (-8 % 64).
Source§fn add_pawn_captures(&mut self, shift: usize, targets: BB)
fn add_pawn_captures(&mut self, shift: usize, targets: BB)
Adds pawn captures to list. Targets and shift are same as for
add_pawn_pushes. Do not use this for en-passant captures (use add_pawn_ep_capture)Auto Trait Implementations§
impl Freeze for MoveVec
impl RefUnwindSafe for MoveVec
impl Send for MoveVec
impl Sync for MoveVec
impl Unpin for MoveVec
impl UnwindSafe for MoveVec
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