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

Board and position elements

import { … } from "@johnmorrisdotca/sugoroku/element";

24.4 kB minified and gzipped, with everything it imports (measured with esbuild)

Exports

NameKindWhat it is
defineBoardfunctionDefines the default playable board, or a subclass under a custom tag.
definePositionfunctionDefines a static position, or a subclass under a host's tag.
readEmbedPositionfunctionReads a GNU position ID or bounded JSON position; null means invalid counts or input.
SUGOROKU_DRAW_OPTION_KEYSconstantNative draw keys, checked by the shared builder.
SUGOROKU_EMBED_OPTION_KEYSconstantThe real mounted options, checked alongside builder coverage.
SUGOROKU_POSITION_OPTION_KEYSconstantAll host position options, checked by the builder.
SugorokuBoardclassNative custom element with reflected setup and presentation.
SugorokuElementOptionstypeHost mount options, including custom colours, names, a match and callbacks.
SugorokuPositionclassA read-only backgammon position, drawn by the native SVG writer.
SugorokuPositionOptionstypeHost data and all native SVG drawing choices for a position.

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