Skip to the content

Jirai地雷

Deal seeded minefields, prove hints from visible clues and mount square, orthogonal, hexagonal or wraparound boards.

Jirai is the Japanese word 地雷 for a land mine. About the name

Contents

Reference · Minesweeper element

defineBoardfunction

Registers the default board, or a subclass under a host's custom tag. Server-safe and idempotent.

Import it

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

Also exported from: @johnmorrisdotca/jirai/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/jirai/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/jirai 0.5.0.