本文へ移動

Meikyuu迷宮

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

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

目次

リファレンス · 縦長の迷路

tallDimensions関数

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

The columns and rows of a maze of shape for the size width (a square maze of that size is width by one and a half times that): as near 2:3 as its cells allow, and with about as many cells as that square maze has (width times one and a half width), so that the sizes are as big to draw whatever the shape is. A hexagon or a triangle has smaller cells, so the same number of them fills the same container with bigger cells.

インポート

import { tallDimensions } from "@johnmorrisdotca/meikyuu/levels/tall";

ほかのエクスポート元: @johnmorrisdotca/meikyuu

定義

function tallDimensions(shape: MeikyuuShape, width: number): [number, number]

引数

名前型説明
shape"square" | "circle" | "hex" | "triangle" | "heart" | "leaf" | "star" | "ring" | "diamond" | "cross" | "moon" | "hexagon" | "pyramid"

The supported native flat-grid geometry or cut-out shape.

widthnumber

The native width in cells or pixels specified by this signature.

戻り値

[number, number]

The columns and rows of a maze of shape for the size width (a square maze of that size is width by one and a half times that): as near 2:3 as its cells allow, and with about as many cells as that square maze has (width times one and a half width), so that the sizes are as big to draw whatever the shape is. A hexagon or a triangle has smaller cells, so the same number of them fills the same container with bigger cells.

例

import { TALL_WIDTHS, tallDimensions } from "@johnmorrisdotca/meikyuu/levels/tall";

console.log(tallDimensions("square",TALL_WIDTHS[0]));
[ 6, 9 ]

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

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

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