LegacyMazeLevel型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
WHERE THE 1.0.0 MAZE LEVELS WENT. The first release numbered 1,000 maze levels in one list; this release has 1,024 in four lists of 256
(MEIKYUU_MAZE_LEVELS), made from them: a level that was good enough stayed in the list, the ones that were too easy (99 small and 7 medium
levels, and a few beside them whose effort the new mazes would have passed) have a new maze, and the 29 hardest large and 11 hardest huge levels
are not in the list. Since 3.0.0 every list is in the order of its score, so where a maze stands in it (now, nowInSize) is not where it stood in
the first release (place). A level somebody solved, or a link to one, still names a number or a recipe of the first release, and this module
answers where that maze is now: the same maze at its place now (now), or no level at all, with the level of its size that scores nearest it to point at.
A recipe never changes what it builds, so a solve kept by recipe is still a solve of that maze whatever it is called.
It is an entry of its own (@johnmorrisdotca/meikyuu/levels/legacy) because it carries the first release's thousand recipes, which
only a site with players from before this release needs.
インポート
import type { LegacyMazeLevel } from "@johnmorrisdotca/meikyuu/levels/legacy";
定義
type LegacyMazeLevel = {
readonly number: number;
readonly code: string;
readonly effort: number;
readonly cells: number;
readonly score: number;
readonly size: MeikyuuSize;
readonly place: number;
readonly now: number | null;
readonly nowInSize: number | null;
readonly nearest: number;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
number | number | Its number in the 1.0.0 list, from 1. |
code | string | |
effort | number | |
cells | number | |
score | number | The score |
size | "small" | "medium" | "large" | "huge" | |
place | number | Its place among the levels of its size in 1.0.0, from 1: the number a site that listed the sizes met it at. |
now | number | null | Its number in |
nowInSize | number | null | Its place among the levels of its size now (1 to 256), when it is still a level. |
nearest | number | The level to point at: this very maze where it is still a level ( |
例
import type { LegacyMazeLevel } from "@johnmorrisdotca/meikyuu/levels/legacy";
import { legacyLevelOf } from "@johnmorrisdotca/meikyuu/levels/legacy";
const value: LegacyMazeLevel = legacyLevelOf(1)!;
console.log(value);{
number: 1,
code: 'square:3x3:prim:enter-leave:7920',
effort: 9,
cells: 9,
score: 2,
size: 'small',
place: 1,
now: null,
nowInSize: null,
nearest: 1
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。