MeikyuuColossalLevel型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
THE COLOSSAL LEVELS: the biggest mazes of the lists, about ten thousand cells, in two lists of 128. The square ones are a hundred cells
across or so in every shape and every way to play (9,500 to 12,000 cells); the tall ones are 64 cells across and 96 down for a square one, and
hexagons and triangles that fill the same container two to three, for a phone held upright. Each list is in order of the geometry-aware score
difficultyOf gives, with measured effort retained alongside it.
A level is a recipe, such as square:100x100:backtracker:to-goal:48213, and a recipe is the whole of it: the list is a few kilobytes, and the maze is
made from its seed where it is played (about twenty milliseconds in a browser for ten thousand cells), never stored. So nothing here is
generated on demand and nothing needs to be: a list that held the mazes themselves would be megabytes, this one holds what makes them.
It is an entry of its own (@johnmorrisdotca/meikyuu/levels/colossal), so a page that plays only the other lists does not carry it.
Play one with mountMeikyuu(host, { recipe: level.code, ratio: level.ratio }); a square list's ratio is square.
インポート
import type { MeikyuuColossalLevel } from "@johnmorrisdotca/meikyuu/levels/colossal";
定義
type MeikyuuColossalLevel = {
readonly kind: "maze";
readonly list: "colossal" | "colossal-tall";
readonly number: 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 | "square";
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
kind | "maze" | |
list | "colossal" | "colossal-tall" | Which list it is in: the square ones or the tall ones. |
number | number | Its place in its list, from 1. |
inSize | number | Its place among the levels of its list, from 1: the same as |
code | string | |
recipe | MazeRecipe | |
cells | number | |
effort | number | What it measures (see |
rating | number | The effort as a rating from 1 to 100 on the scale of the maze lists; a colossal maze is at the top of it. |
score | number | How hard it is to play, from 0 to 100 (see |
ratio | number | "square" | The box's width over its height, for the board's |
例
import type { MeikyuuColossalLevel } from "@johnmorrisdotca/meikyuu/levels/colossal";
import { colossalLevelOf } from "@johnmorrisdotca/meikyuu/levels/colossal";
const value: MeikyuuColossalLevel = colossalLevelOf(1)!;
console.log(value);{
kind: 'maze',
list: 'colossal',
number: 1,
inSize: 1,
code: 'star:162:kruskal:centre-out:1241997242',
recipe: {
shape: 'star',
w: 162,
h: 162,
algorithm: 'kruskal',
mode: 'centre-out',
seed: 1241997242
},
cells: 9630,
effort: 1809,
rating: 83,
score: 54,
ratio: 'square'
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。