pub struct Board { /* private fields */ }Expand description
Represents a chess board.
Implementations§
Source§impl Board
impl Board
Sourcepub fn get(&self, file: File, rank: Rank) -> &Piece
pub fn get(&self, file: File, rank: Rank) -> &Piece
Returns a reference to the Piece stored at the specified location.
Sourcepub fn set(&mut self, file: File, rank: Rank, piece: Piece)
pub fn set(&mut self, file: File, rank: Rank, piece: Piece)
Sets the Piece stored at the specified location.
Trait Implementations§
Source§impl FromIterator<Board> for Arena
impl FromIterator<Board> for Arena
Source§impl FromIterator<Piece> for Board
impl FromIterator<Piece> for Board
impl Copy for Board
Auto Trait Implementations§
impl Freeze for Board
impl RefUnwindSafe for Board
impl Send for Board
impl Sync for Board
impl Unpin for Board
impl UnwindSafe for Board
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