Struct poirebot::game::Board [−][src]
Fields
white: BoardSide
The Color::White
board side.
black: BoardSide
The Color::Black
board side.
Implementations
impl Board
[src]
pub fn from_fen(fen: &str) -> Result<Self>
[src]
Convert a Forsyth–Edwards Notation (FEN) string to Board
pub fn to_fen(&self) -> String
[src]
Convert a Board
to Forsyth–Edwards Notation (FEN) string
impl Board
[src]
pub fn apply_move(&mut self, m: Move)
[src]
Update the board after a player moved.
pub fn get_pawns(&self, color: Color) -> Vec<Pieces>
[src]
Get a list of pawns of the given color.
pub fn get_piece(&self, position: Position) -> Option<Pieces>
[src]
Get the piece at the given position if any.
pub fn get_bitboard(&self) -> BitBoardⓘ
[src]
Returns a bitboard for all the pieces in the board.
pub fn mutate<F: FnOnce(&mut Self)>(&mut self, f: F)
[src]
Mutates and then refresh inherited properties.
pub fn get_squares_attacked_by_pawns(&self, color: Color) -> BitBoardⓘ
[src]
Returns a bitboard with the opponent squares being attacked by one’s side pawns. Note: this doesn’t mean the move is legal; it could cause a self-check for example.
pub fn get_side(&self, color: Color) -> BoardSide
[src]
pub fn get_side_mut(&mut self, color: Color) -> &mut BoardSide
[src]
Trait Implementations
impl Clone for Board
[src]
impl Copy for Board
[src]
impl Debug for Board
[src]
impl Default for Board
[src]
impl Eq for Board
[src]
impl PartialEq<Board> for Board
[src]
impl StructuralEq for Board
[src]
impl StructuralPartialEq for Board
[src]
Auto Trait Implementations
impl RefUnwindSafe for Board
impl Send for Board
impl Sync for Board
impl Unpin for Board
impl UnwindSafe for Board
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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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, 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>,