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: u32
The amount of points to reach for declaring a winner of the match, default is 7.
beaver: bool
When offered the cube, allow to re-double but keep it, default is false.
raccoon: bool
If a player plays “beaver”, the other may double again, letting the opponent keep the cube. Default is false
murphy: bool
If both players roll the same opening number, the dice is doubled, remaining in the middle of the board. Default is false.
murphy_limit: u8
How often to apply automatic doubling rule. 0 means always on. Default is 0.
jacoby: bool
Gammon and Backgammon only count for double or triple values if the cube has already been offered. Default is false.
crawford: bool
When a player first reaches a score of points - 1, no doubling is allowed for the following game. Default is true.
holland: bool
Permits to double after Crawford game only if both players have rolled at least twice. Default is false.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rules
impl<'de> Deserialize<'de> for Rules
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>,
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