MeikyuuMazeLevel型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A numbered flat-maze recipe, difficulty measures, cell count and place within its size.
インポート
import type { MeikyuuMazeLevel } from "@johnmorrisdotca/meikyuu/levels";
定義
type MeikyuuMazeLevel = Base & {
readonly kind: "maze";
readonly recipe: MazeRecipe;
readonly cells: number;
readonly score: number;
readonly size: MeikyuuSize;
readonly inSize: number;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
number | number | Its place in its own list, from 1. |
code | string | The recipe as one short word. |
effort | number | What it measures (see |
rating | number | The effort as a rating from 1 to 100 on the scale of the maze list. |
kind | "maze" | |
recipe | MazeRecipe | |
cells | number | |
score | number | How hard it is to play, from 0 to 100 (see |
size | "small" | "medium" | "large" | "huge" | The size it belongs to, as |
inSize | number | Its place among the levels of its size, from 1: the number a person playing that size meets it at. |
例
import type { MeikyuuMazeLevel } from "@johnmorrisdotca/meikyuu/levels";
import { levelOf } from "@johnmorrisdotca/meikyuu/levels";
const value: MeikyuuMazeLevel = levelOf("maze",1)!;
console.log(value);{
kind: 'maze',
number: 1,
code: 'square:3x5:prim:to-goal:1538214105',
effort: 22,
rating: 15,
score: 13,
cells: 15,
size: 'small',
inSize: 1,
recipe: {
shape: 'square',
w: 3,
h: 5,
algorithm: 'prim',
mode: 'to-goal',
seed: 1538214105
}
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。