pub enum MoveType {
Normal {
capture: bool,
promotion: Option<PieceType>,
},
Castle {
side: CastleType,
},
EnPassant,
}
Expand description
Represents the type of a move
§Variants
Normal
: A normal movecapture
: Whether the move is a capturepromotion
: The piece type to promote to
Castle
: A castle moveside
: The side of the board to castle on
EnPassant
: An en passant move- The move is an en passant
Variants§
Trait Implementations§
impl StructuralPartialEq for MoveType
Auto Trait Implementations§
impl Freeze for MoveType
impl RefUnwindSafe for MoveType
impl Send for MoveType
impl Sync for MoveType
impl Unpin for MoveType
impl UnwindSafe for MoveType
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