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

LEVEL_SIZESconstant

Size and mine count of each level on a rectangular board. Shaped boards keep the size and the density.

Import it

import { LEVEL_SIZES } from "@johnmorrisdotca/jirai";

Definition

const LEVEL_SIZES: Record<"easy" | "medium" | "hard" | "extra-hard", { width: number; height: number; mines: number; }> = {
    easy: { width: 9, height: 9, mines: 10 },
    medium: { width: 16, height: 16, mines: 40 },
    hard: { width: 30, height: 16, mines: 99 },
    "extra-hard": { width: 40, height: 24, mines: 240 },
}

Members

NameTypeDescription
easy{ width: number; height: number; mines: number; }
medium{ width: number; height: number; mines: number; }
hard{ width: number; height: number; mines: number; }
extra-hard{ width: number; height: number; mines: number; }

Examples

import { LEVEL_SIZES } from "@johnmorrisdotca/jirai";

console.log(LEVEL_SIZES);
{
  easy: { width: 9, height: 9, mines: 10 },
  medium: { width: 16, height: 16, mines: 40 },
  hard: { width: 30, height: 16, mines: 99 },
  'extra-hard': { width: 40, height: 24, mines: 240 }
}

What it prints (run when this page was built)

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