本文へ移動

Meikyuu迷宮

シード付きの迷路と矢印パズルを作り、番号付きの問題を進め、平面や立体表面で遊べます。

「迷宮」は迷路のように入り組んだ場所を表す言葉です。 名前について(英語)

目次

リファレンス · 初版の番号付き問題

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;
};

メンバー

名前型説明
numbernumber

Its number in the 1.0.0 list, from 1.

codestring
effortnumber
cellsnumber
scorenumber

The score difficultyOf gives it now (3.0.0 on: counting how much of the map its answer covers).

size"small" | "medium" | "large" | "huge"
placenumber

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.

nownumber | null

Its number in MEIKYUU_MAZE_LEVELS now, from 1, when it is still a level; null when it is not.

nowInSizenumber | null

Its place among the levels of its size now (1 to 256), when it is still a level.

nearestnumber

The level to point at: this very maze where it is still a level (now), else the level of its size whose score is nearest its own (the first, on a tie), its number from 1 in MEIKYUU_MAZE_LEVELS.

例

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
}

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

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

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