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 · Playable board

ensureSugorokuPlayStylefunction

Put the style in the page once: in the document's head, or in the shadow root the host is in.

Import it

import { ensureSugorokuPlayStyle } from "@johnmorrisdotca/sugoroku/play";

Definition

function ensureSugorokuPlayStyle(host: Element): void

Parameters

NameTypeDescription
hostElement

The DOM element receiving the native board or scoped styles.

Examples

import { ensureSugorokuPlayStyle } from "@johnmorrisdotca/sugoroku/play";

const host = document.createElement("div");
ensureSugorokuPlayStyle(host);
console.log(host.tagName);

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