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;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
arrows | ArrowRecipe | |
maze | MazeRecipe |
例
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 }
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。