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 · Native Minesweeper player

mountJiraifunction

One playable board in any element. The engine owns the rules, this module owns presses, focus, the clock and the worker. Destroy removes only its own root, so two mounted boards never take each other's listeners or children.

Import it

import { mountJirai } from "@johnmorrisdotca/jirai/play";

Definition

function mountJirai(host: HTMLElement, options?: MountOptions): JiraiMount

Parameters

NameTypeDescription
hostHTMLElement

The HTMLElement that owns the native interface.

options (optional)MountOptions

Native settings and callbacks for this mounted interface.

Returns

JiraiMount

The native mounted handle, including controls and destroy() cleanup.

Examples

import { mountJirai } from "@johnmorrisdotca/jirai/play";
const show = (host: HTMLElement, options: Parameters<typeof mountJirai>[1]) => mountJirai(host, options);
console.log(typeof show); // function
function

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/jirai 0.5.0.