Skip to the content

Sugoroku双六

Play backgammon and its relatives with native rules, cube and match scoring, seeded dice and replayable records.

Sugoroku is the Japanese name 双六 for games of tables. About the name

Contents

Reference · Rules, games and records

settingsForfunction

Settings from a variant key (or a row) and rules, left-out rules filled in.

Import it

import { settingsFor } from "@johnmorrisdotca/sugoroku";

Definition

function settingsFor(variant: VariantKey | VariantSpec, rules?: Partial<Rules>): Settings

Parameters

NameTypeDescription
variantVariantKey | VariantSpec

The variant key or resolved specification.

rules (optional)Partial<Rules>

The complete or partial native rules specified by the signature.

Returns

Settings

Settings from a variant key (or a row) and rules, left-out rules filled in.

Examples

import { settingsFor } from "@johnmorrisdotca/sugoroku";

console.log(settingsFor("nackgammon",{points:5}).variant.key);
nackgammon

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/sugoroku 1.1.1.