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 · Rules, generation and deductions

Constrainttype

An exact count over unknown cells, with the clues that supplied it.

Import it

import type { Constraint } from "@johnmorrisdotca/jirai";

Definition

type Constraint = {
    cells: readonly number[];
    mines: number;
    sources: readonly number[];
};

Members

NameTypeDescription
cellsreadonly number[]
minesnumber
sourcesreadonly number[]

Examples

import type { Constraint } from "@johnmorrisdotca/jirai";

const value: Constraint = {cells:[0,1],mines:1,sources:[2]};
console.log(value);
{ cells: [ 0, 1 ], mines: 1, sources: [ 2 ] }

What it prints (run when this page was built)

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