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

PRESETSconstant

Common minefield dimensions and mine counts. The levels, their older names, and two shapes of field.

Import it

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

Definition

const PRESETS: { readonly beginner: { width: number; height: number; mines: number; }; readonly intermediate: { width: number; height: number; mines: number; }; readonly expert: { width: number; height: number; mines: number; }; readonly wide: { readonly width: 21; readonly height: 9; readonly mines: 24; }; readonly tall: { readonly width: 9; readonly height: 21; readonly mines: 24; }; readonly easy: { width: number; height: number; mines: number; }; readonly medium: { width: number; height: number; mines: number; }; readonly hard: { width: number; height: number; mines: number; }; readonly "extra-hard": { width: number; height: number; mines: number; }; } = {
    ...LEVEL_SIZES,
    beginner: LEVEL_SIZES.easy,
    intermediate: LEVEL_SIZES.medium,
    expert: LEVEL_SIZES.hard,
    wide: { width: 21, height: 9, mines: 24 },
    tall: { width: 9, height: 21, mines: 24 },
} as const

Members

NameTypeDescription
beginner{ width: number; height: number; mines: number; }
intermediate{ width: number; height: number; mines: number; }
expert{ width: number; height: number; mines: number; }
wide{ readonly width: 21; readonly height: 9; readonly mines: 24; }
tall{ readonly width: 9; readonly height: 21; readonly mines: 24; }
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 { PRESETS } from "@johnmorrisdotca/jirai";

console.log(PRESETS);
{
  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 },
  beginner: { width: 9, height: 9, mines: 10 },
  intermediate: { width: 16, height: 16, mines: 40 },
  expert: { width: 30, height: 16, mines: 99 },
  wide: { width: 21, height: 9, mines: 24 },
  tall: { width: 9, height: 21, mines: 24 }
}

What it prints (run when this page was built)

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