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

presetByNamefunction

The preset a site's printed name leads to, or undefined. Case and spacing around the name do not matter.

Import it

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

Definition

function presetByName(name: string): Preset | undefined

Parameters

NameTypeDescription
namestring

The colour property, preset name or sound identifier specified by this signature.

Returns

Preset | undefined

The matching preset, or undefined for an unknown name.

Examples

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

console.log(presetByName("backgammon")?.key);
backgammon

What it prints (run when this page was built)

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