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

How-to

Share a UTC daily field

Pin a real date, topology, settings and opening for reproducible daily play.

Use a real UTC date

import { dailySeed,newGame,type Settings } from "@johnmorrisdotca/jirai";
const settings: Settings={width:3,height:3,mines:1,grid:"orthogonal",noGuess:false,opening:"safe",seed:dailySeed("2024-01-01","orthogonal")};
console.log(settings.seed,newGame(settings).status);
409828595 ready

dailySeed requires a real YYYY-MM-DD date and uses the variant’s native seed format. A local calendar day can differ from UTC. A pinned date recreates that day; the embed’s today option follows the UTC day when loaded. It does not make all settings or opening cells equivalent.

Preserve grid, shape, dimensions, mine count, opening policy and first cell, plus package version and generation options. The first reveal is part of the deal. A shared numeric seed alone cannot identify a full board when those inputs differ. The embed contract covers day parsing, attribute reflection and public events.

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