pub struct Match {
pub rules: Rules,
pub games: Vec<Game>,
}Expand description
Represents a Backgammon match
Fields§
§rules: RulesThe rules set for the match
games: Vec<Game>The games played in the match
Implementations§
Trait Implementations§
Source§impl GameRules for Match
Implements SetRules for Match
impl GameRules for Match
Implements SetRules for Match
Source§fn with_beaver(self) -> Self
fn with_beaver(self) -> Self
When offered the cube, allow to re-double but keep it
Source§fn with_raccoon(self) -> Self
fn with_raccoon(self) -> Self
If a player plays “beaver”, the other may double again, letting the opponent keep the cube.
Source§fn with_murphy(self, limit: u8) -> Self
fn with_murphy(self, limit: u8) -> Self
If both players roll the same opening number, the dice is doubled, remaining in the middle
of the board.
Source§fn with_jacoby(self) -> Self
fn with_jacoby(self) -> Self
Gammon and Backgammon only count for double or triple values if the cube has already been
offered.
Source§fn with_holland(self) -> Self
fn with_holland(self) -> Self
Permits to double after Crawford game only if both players have rolled at least twice.
Source§impl MatchRules for Match
Implements SetRules for Match
impl MatchRules for Match
Implements SetRules for Match
Source§fn with_points(self, points: u32) -> Self
fn with_points(self, points: u32) -> Self
Set the number of points to reach for declaring a winner.
Source§fn with_crawford(self) -> Self
fn with_crawford(self) -> Self
When a player first reaches a score of points - 1, no doubling is allowed for the following
game.
Auto Trait Implementations§
impl Freeze for Match
impl RefUnwindSafe for Match
impl Send for Match
impl Sync for Match
impl Unpin for Match
impl UnwindSafe for Match
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