Struct shakmaty::Pockets
[−]
[src]
pub struct Pockets { pub white: Pocket, pub black: Pocket, }
Pockets to hold captured pieces for both sides (in Crazyhouse).
Fields
white: Pocket
black: Pocket
Methods
impl Pockets
[src]
pub fn by_color(&self, color: Color) -> &Pocket
[src]
pub fn by_color_mut(&mut self, color: Color) -> &mut Pocket
[src]
pub fn by_piece(&self, piece: Piece) -> u8
[src]
pub fn by_piece_mut(&mut self, piece: Piece) -> &mut u8
[src]
pub fn add(&mut self, piece: Piece)
[src]
pub fn remove(&mut self, piece: Piece)
[src]
pub fn count(&self) -> u8
[src]
Trait Implementations
impl Clone for Pockets
[src]
fn clone(&self) -> Pockets
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Pockets
[src]
impl PartialEq for Pockets
[src]
fn eq(&self, __arg_0: &Pockets) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Pockets) -> bool
[src]
This method tests for !=
.
impl Debug for Pockets
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more