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

defineBoardfunction

Defines the default playable board, or a subclass under a custom tag. Server-safe and idempotent.

Import it

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

Also exported from: @johnmorrisdotca/sugoroku/element/define

Definition

function defineBoard(tagName?: string, registry?: CustomElementRegistry | undefined): void

Parameters

NameTypeDescription
tagName (optional)string

The custom tag name; omitted to use the package default.

registry (optional)CustomElementRegistry | undefined

The custom-element registry; omitted outside a browser.

Examples

import { defineBoard } from "@johnmorrisdotca/sugoroku/element";
defineBoard();
console.log(typeof defineBoard); // function
function

What it prints (run when this page was built)

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