本文へ移動

Meikyuu迷宮

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

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

目次

リファレンス · 迷路・矢印・混合の盤

MixedRecipe型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

THE MIXED PUZZLE: an arrow board with some arrows locked, and a labyrinth beside it with an unlock button hidden deep inside. The labyrinth is an ordinary maze played to its goal (the button); reaching the button unlocks every locked arrow at once. The arrows are the puzzle (clear them all, with the hearts you have); the labyrinth is the way to the arrows that are in the way.

A locked arrow can be in the way of others, so the puzzle cannot be finished without the button, and it can always be: the arrows can all be cleared once they are unlocked, and the labyrinth can always be solved. A level is its two recipes, written <arrows>|<maze>.

インポート

import type { MixedRecipe } from "@johnmorrisdotca/meikyuu";

定義

type MixedRecipe = {
    readonly arrows: ArrowRecipe;
    readonly maze: MazeRecipe;
};

メンバー

名前型説明
arrowsArrowRecipe
mazeMazeRecipe

例

import type { ArrowRecipe, MazeRecipe, MixedRecipe } from "@johnmorrisdotca/meikyuu";
import { buildMaze, makeArrows } from "@johnmorrisdotca/meikyuu";

const recipe: MazeRecipe = {shape:"square",w:5,h:5,algorithm:"backtracker",mode:"to-goal",seed:42};
const maze = buildMaze(recipe);
const arrowRecipe: ArrowRecipe = {shape:"square",w:5,h:5,longest:3,seed:42};
const arrows = makeArrows(arrowRecipe);
const mixedRecipe: MixedRecipe = {maze:recipe,arrows:arrowRecipe};
const value: MixedRecipe = mixedRecipe;
console.log(value);
{
  maze: {
    shape: 'square',
    w: 5,
    h: 5,
    algorithm: 'backtracker',
    mode: 'to-goal',
    seed: 42
  },
  arrows: { shape: 'square', w: 5, h: 5, longest: 3, seed: 42 }
}

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

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

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