[−][src]Struct chess_move_gen::Position
Position encodes all positional information and non-positional game state
Implementations
impl Position
[src]
pub fn make(&mut self, mv: Move) -> Option<(Piece, Square)>
[src]
Returns piece captured and square if any
pub fn unmake(
&mut self,
mv: Move,
capture: Option<(Piece, Square)>,
original_state: &State,
original_hash_key: u64
)
[src]
&mut self,
mv: Move,
capture: Option<(Piece, Square)>,
original_state: &State,
original_hash_key: u64
)
impl Position
[src]
pub fn new(grid: [Piece; 64], state: State) -> Position
[src]
pub fn from_fen(fen: &str) -> Result<Position, String>
[src]
Construct a new position from a FEN string
pub fn to_fen(&self) -> String
[src]
pub fn hash_key(&self) -> u64
[src]
pub fn state(&self) -> &State
[src]
Get position non-positional state
pub fn grid(&self) -> &[Piece; 64]
[src]
Get position position
pub fn at(&self, sq: Square) -> Piece
[src]
Get piece at square
pub fn to_string(&self) -> String
[src]
pub fn bb_side(&self, side: Side) -> BB
[src]
Get bitboard of pieces for a particular side
pub fn bb_pc(&self, pc: Piece) -> BB
[src]
Get bitboard of pieces for a particular piece
pub fn piece_iter(&self, pc: Piece) -> BBIteratorⓘNotable traits for BBIterator
impl Iterator for BBIterator type Item = (Square, BB);
[src]
Notable traits for BBIterator
impl Iterator for BBIterator type Item = (Square, BB);
pub fn bb_sliders(&self, side: Side) -> (BB, BB)
[src]
Get bitboard of sliding pieces for a particular side
pub fn bb_occupied(&self) -> BB
[src]
Get bitboard of all occupied squares
pub fn bb_empty(&self) -> BB
[src]
Get bitboard of all empty squares
Trait Implementations
impl Clone for Position
[src]
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Position
[src]
impl Display for Position
[src]
Auto Trait Implementations
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
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, U> Cast<U> for T where
U: FromCast<T>,
[src]
U: FromCast<T>,
impl<T> From<T> for T
[src]
impl<T> FromCast<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,