[−][src]Struct pleco::board::movegen::MoveGen
Public move generator.
This is a wrapper type around InnerMoveGen
, allowing for a more friendly API
Methods
impl MoveGen
[src]
pub fn generate<L: Legality, G: GenTypeTrait>(chessboard: &Board) -> MoveList
[src]
Returns MoveList
of all moves for a given board, Legality & GenType.
pub fn generate_scoring<L: Legality, G: GenTypeTrait>(
chessboard: &Board
) -> ScoringMoveList
[src]
chessboard: &Board
) -> ScoringMoveList
Returns a ScoringMoveList
of all moves for a given board, Legality & GenType.
pub unsafe fn extend<L: Legality, G: GenTypeTrait, MP: MVPushable>(
chessboard: &Board,
movelist: &mut MP
) where
<MP as Index<usize>>::Output: Sized,
[src]
chessboard: &Board,
movelist: &mut MP
) where
<MP as Index<usize>>::Output: Sized,
Extends the current list of moves of a certain Legality, and Generation type. This method will correctly set the new length of the list.
Safety
Unsafe due to possible overwriting, as it is unaware of the current list's length.
pub unsafe fn extend_from_ptr<L: Legality, G: GenTypeTrait, MP: MVPushable>(
chessboard: &Board,
ptr: *mut MP::Output
) -> *mut MP::Output where
<MP as Index<usize>>::Output: Sized,
[src]
chessboard: &Board,
ptr: *mut MP::Output
) -> *mut MP::Output where
<MP as Index<usize>>::Output: Sized,
Extends the current list of moves of a certain Legality, and Generation type. Takes in a pointer to the next available (empty) index, and returns the pointer to the next open index after generating the moves
Safety
Obviously, this is extremely unsafe to use, as there is a possibility of both overwriting valid memory, or otherwise pushing in an invalid pointer.
Also, this does not update the size of the movelist inputted. It's recommended to use the method
MVPushable::unchecked_set_len(...)
to set the size manually after this method.
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,