Struct backgammon::rules::BoardDisplay
source · pub struct BoardDisplay {
pub board: [i8; 24],
pub bar: (u8, u8),
pub off: (u8, u8),
}
Expand description
Represents the Backgammon board for both players (to be used for graphical representation).
Fields§
§board: [i8; 24]
The board represented as an array of 24 fields, each of which can hold 0 or more checkers. Positive amounts represent checkers of player 0, negative amounts represent checkers of player 1.
bar: (u8, u8)
The bar for both players
off: (u8, u8)
The off for both players
Trait Implementations§
source§impl Debug for BoardDisplay
impl Debug for BoardDisplay
source§impl<'de> Deserialize<'de> for BoardDisplay
impl<'de> Deserialize<'de> for BoardDisplay
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<BoardDisplay> for BoardDisplay
impl PartialEq<BoardDisplay> for BoardDisplay
source§fn eq(&self, other: &BoardDisplay) -> bool
fn eq(&self, other: &BoardDisplay) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for BoardDisplay
impl Serialize for BoardDisplay
impl StructuralPartialEq for BoardDisplay
Auto Trait Implementations§
impl RefUnwindSafe for BoardDisplay
impl Send for BoardDisplay
impl Sync for BoardDisplay
impl Unpin for BoardDisplay
impl UnwindSafe for BoardDisplay
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