[−][src]Struct legal_chess::pieces::knight::Knight
Fields
position: Position
color: Color
Trait Implementations
impl Debug for Knight
[src]
impl Piece for Knight
[src]
fn moves_ignoring_pins(
&self,
board: &Board,
_en_passant: &Option<Position>,
_king_pos: Position
) -> Vec<ChessMove>
[src]
&self,
board: &Board,
_en_passant: &Option<Position>,
_king_pos: Position
) -> Vec<ChessMove>
fn piece(&self) -> PieceEnum
[src]
fn attacks(&self, _board: &Board, _enemy_king_pos: Position) -> Vec<Position>
[src]
fn position(&self) -> &Position
[src]
fn mut_position(&mut self) -> &mut Position
[src]
fn color(&self) -> &Color
[src]
fn set_position(&mut self, position: &Position)
[src]
fn moves(
&self,
board: &Board,
king: Position,
en_passant: &Option<Position>
) -> Vec<ChessMove>
[src]
&self,
board: &Board,
king: Position,
en_passant: &Option<Position>
) -> Vec<ChessMove>
fn valid_moves_during_pin(
&self,
board: &Board,
king: Position
) -> Option<Vec<Position>>
[src]
&self,
board: &Board,
king: Position
) -> Option<Vec<Position>>
Auto Trait Implementations
impl RefUnwindSafe for Knight
impl Send for Knight
impl Sync for Knight
impl Unpin for Knight
impl UnwindSafe for Knight
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,