本文へ移動

Jirai地雷

シード付きの地雷の盤を作り、見える数字からヒントを証明し、四角・四近傍・六角・端がつながる盤で遊べます。

「地雷」は、地面に埋められた爆弾のことです。 名前について(英語)

目次

リファレンス · 規則・生成・推論

GenerationOptions型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

Work limits for seeded board generation and its no-guess check. attempts is the number of random layouts tried first; repairs is how many single-mine moves the repair stage may try on the closest of them (0, or repair: false, keeps the 0.2 behaviour of giving up after the attempts); enumerate switches the exact small-frontier check.

インポート

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

定義

type GenerationOptions = {
    attempts?: number;
    repairs?: number;
    repair?: boolean;
    enumerate?: boolean;
};

メンバー

名前型説明
attempts (省略可)number | undefined
repairs (省略可)number | undefined
repair (省略可)boolean | undefined
enumerate (省略可)boolean | undefined

例

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

const value: GenerationOptions = {attempts:1,repair:false,enumerate:true};
console.log(value);
{ attempts: 1, repair: false, enumerate: true }

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/jirai 0.5.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。