pub struct Parts {
pub board: Board,
pub turn: Player,
pub castles: Castles,
pub en_passant: Option<EnPassant>,
pub reversible: u32,
pub round: NonZeroU32,
}Expand description
The raw parts from which a position can be constructed.
Fields§
§board: Boardlocation of the pieces on the board
turn: Playerplayer to move
castles: Castlespossible castle sides
en_passant: Option<EnPassant>possible en passant square
reversible: u32ply counter since last capture or pawn move (reversible moves)
round: NonZeroU32starts at 1 and increments after every Black move
Implementations§
Trait Implementations§
impl Copy for Parts
impl Eq for Parts
Source§impl Ord for Parts
impl Ord for Parts
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Parts
impl PartialOrd for Parts
impl StructuralPartialEq for Parts
Auto Trait Implementations§
impl Freeze for Parts
impl RefUnwindSafe for Parts
impl Send for Parts
impl Sync for Parts
impl Unpin for Parts
impl UnsafeUnpin for Parts
impl UnwindSafe for Parts
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