MeikyuuTallLevel型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
THE TALL LEVELS: portrait mazes for a phone held upright, 1,536 of them in six sizes of 256, each size in order of the score
difficultyOf gives, so no level is easier than the one before inside its size. A level is a recipe, such as
square:10x15:wilson:to-goal:48213, narrower than it is tall, two columns to three rows; squares, hexagons and triangles are
laid out to fill a container of that shape with about the same number of cells (tallDimensions). The recipe is the upright maze whatever screen it is played on: a wide
screen turns the drawing, and a line drawn on it is the same line (orientation in mountMeikyuu).
This is a list of its own, in an entry of its own (@johnmorrisdotca/meikyuu/levels/tall), so a page that plays only the square
mazes does not carry it. Play one with mountMeikyuu(host, { recipe: level.code, ratio: level.ratio }).
インポート
import type { MeikyuuTallLevel } from "@johnmorrisdotca/meikyuu/levels/tall";
定義
type MeikyuuTallLevel = {
readonly kind: "maze";
readonly list: "tall";
readonly number: number;
readonly size: number;
readonly width: number;
readonly inSize: number;
readonly code: string;
readonly recipe: MazeRecipe;
readonly cells: number;
readonly effort: number;
readonly rating: number;
readonly score: number;
readonly ratio: number;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
kind | "maze" | |
list | "tall" | |
number | number | Its place in the whole tall list, from 1. |
size | number | The size, from 1 (the smallest) to 6. |
width | number | How many cells across a square maze of its size is (6, 8, 10, 12, 16 or 20). |
inSize | number | Its place among the levels of its size, from 1. |
code | string | |
recipe | MazeRecipe | |
cells | number | |
effort | number | |
rating | number | |
score | number | How hard it is to play, from 0 to 100 (see |
ratio | number | The container's width over its height, for the board's |
例
import type { MeikyuuTallLevel } from "@johnmorrisdotca/meikyuu/levels/tall";
import { tallLevelOf } from "@johnmorrisdotca/meikyuu/levels/tall";
const value: MeikyuuTallLevel = tallLevelOf(1)!;
console.log(value);{
kind: 'maze',
list: 'tall',
number: 1,
size: 1,
width: 6,
inSize: 1,
code: 'triangle:7x7:kruskal:centre-out:1477605004',
recipe: {
shape: 'triangle',
w: 7,
h: 7,
algorithm: 'kruskal',
mode: 'centre-out',
seed: 1477605004
},
cells: 49,
effort: 47,
rating: 27,
score: 20,
ratio: 0.6666666666666666
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。