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

definePositionfunction

Defines a static position, or a subclass under a host's tag. Safe on a server.

Import it

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

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

Definition

function definePosition(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 { definePosition } from "@johnmorrisdotca/sugoroku/element";
definePosition();
console.log(typeof definePosition); // function
function

What it prints (run when this page was built)

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