pub struct Position {
pub public: PositionPublic,
/* private fields */
}Expand description
A position in a game, with its derived, evaluation, and public data.
Fields§
§public: PositionPublicImplementations§
Source§impl Position
impl Position
pub const fn options(&self) -> &[MoveSlot]
pub const fn position(&self) -> Position
pub fn comment(&self) -> Option<&Text>
pub const fn evaluation(&self) -> Option<&Evaluation>
pub const fn expanded(&self) -> bool
pub const fn legal(&self) -> &[Move]
pub const fn check(&self) -> Option<Check>
pub const fn is_terminal(&self) -> bool
pub const fn terminal(&self) -> Option<Terminal>
pub const fn is_checkmate(&self) -> bool
pub const fn is_stalemate(&self) -> bool
Methods from Deref<Target = Position>§
pub fn apparent_fen(&self) -> String
pub fn fen(&self) -> String
pub fn chess_fen(&self) -> Option<String>
pub fn shredder_fen(&self) -> String
pub fn transposition_fen(&self) -> String
pub fn legal_plays(&self) -> Vec<Move>
pub fn legal_castle_plays(&self) -> Vec<Move>
pub fn pseudo_piece_plays(&self) -> Vec<Move>
pub fn legal_king_plays(&self) -> Vec<Move>
pub fn can_castle(&self, side: Side) -> Option<Move>
pub fn is_terminal(&self) -> bool
pub fn terminal(&self) -> Option<Terminal>
pub fn board(&self) -> Board
pub fn turn(&self) -> Player
pub fn castles(&self) -> Castles
pub fn en_passant(&self) -> Option<EnPassant>
pub fn reversible(&self) -> u32
pub fn round(&self) -> NonZeroU32
pub fn requires_freestyle(&self) -> bool
pub fn checkers(&self) -> Bitboard
pub fn is_check(&self) -> bool
pub fn capture_plays(&self) -> Vec<Move>
pub fn castle_side_plays(&self, side: Side) -> Vec<Move>
pub fn castle_plays(&self) -> Vec<Move>
pub fn first_ply(&self) -> usize
Trait Implementations§
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnsafeUnpin for Position
impl UnwindSafe for Position
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