pub struct Rules {
pub points: u32,
pub beaver: bool,
pub raccoon: bool,
pub murphy: bool,
pub murphy_limit: u8,
pub jacoby: bool,
pub crawford: bool,
pub holland: bool,
}Expand description
Holds all the rule settings
Fields§
§points: u32The amount points to reach for declaring a winner of the match, default is 7.
beaver: boolWhen offered the cube, allow to re-double but keep it, default is false.
raccoon: boolIf a player plays “beaver”, the other may double again, letting the opponent keep the cube. Default is false.
murphy: boolIf both players roll the same opening number, the dice is doubled, remaining in the middle of the board. Default is false.
murphy_limit: u8How often to apply automatic doubling rule. 0 means always on. Default is 0.
jacoby: boolGammon and Backgammon only count for double or triple values if the cube has already been offered. Default is false.
crawford: boolWhen a player first reaches a score of points - 1, no doubling is allowed for the following game. Default is true.
holland: boolPermits to double after Crawford game only if both players have rolled at least twice. Default is false.
Trait Implementations§
Source§impl GameRules for Rules
Implements SetRules for Rules
impl GameRules for Rules
Implements SetRules for Rules
Source§fn with_beaver(self) -> Self
fn with_beaver(self) -> Self
Source§fn with_raccoon(self) -> Self
fn with_raccoon(self) -> Self
Source§fn with_murphy(self, limit: u8) -> Self
fn with_murphy(self, limit: u8) -> Self
Source§fn with_jacoby(self) -> Self
fn with_jacoby(self) -> Self
Source§fn with_holland(self) -> Self
fn with_holland(self) -> Self
Source§impl MatchRules for Rules
Implements SetRules for Rules
impl MatchRules for Rules
Implements SetRules for Rules