pub enum Rules {
Named(String),
Explicit {
ko: Ko,
scoring: Scoring,
tax: Tax,
suicide: bool,
has_button: bool,
white_handicap_bonus: Bonus,
friendly_pass_ok: bool,
},
}Expand description
Rules settings for KataGo.
See KataGo’s Supported Go Rules for more details.
let japanese_rules = Rules::japanese();
let bga_rules = Rules::Named("bga".to_string());
let custom_rules = Rules::Explicit {
ko: Ko::Positional,
scoring: Scoring::Territory,
tax: Tax::Seki,
suicide: false,
has_button: false,
white_handicap_bonus: Bonus::Zero,
friendly_pass_ok: true,
};Variants§
Named(String)
A ruleset identified by name.
Explicit
A ruleset defined by settings for each rule.
Fields
Whether the button rule is used.
Implementations§
Source§impl Rules
impl Rules
Sourcepub fn chinese_ogs() -> Self
pub fn chinese_ogs() -> Self
Chinese rules as implemented online (positional superko).
Sourcepub fn stone_scoring() -> Self
pub fn stone_scoring() -> Self
Stone scoring (area scoring with group tax).
Sourcepub fn ancient_territory() -> Self
pub fn ancient_territory() -> Self
Territory scoring with group tax.
AGA rules using the button.
Sourcepub fn new_zealand() -> Self
pub fn new_zealand() -> Self
New Zealand rules.
Sourcepub fn tromp_taylor() -> Self
pub fn tromp_taylor() -> Self
Tromp-Taylor rules.
Trait Implementations§
impl Eq for Rules
impl StructuralPartialEq for Rules
Auto Trait Implementations§
impl Freeze for Rules
impl RefUnwindSafe for Rules
impl Send for Rules
impl Sync for Rules
impl Unpin for Rules
impl UnsafeUnpin for Rules
impl UnwindSafe for Rules
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