本文へ移動

Meikyuu迷宮

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

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

目次

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

gridOf関数

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

A grid by name. w and h are columns and rows for squares, hexagons and triangles, and the size of the raster a shape is cut from for the rest (h is ignored there); for a circle w is the number of rings, and for a hexagon the radius, and for a pyramid the rows.

インポート

import { gridOf } from "@johnmorrisdotca/meikyuu";

定義

function gridOf(shape: MeikyuuShape, w: number, h?: number): Grid

引数

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

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

wnumber

The native grid width in cells.

h (省略可)number

The native grid height in cells.

戻り値

Grid

A grid by name. w and h are columns and rows for squares, hexagons and triangles, and the size of the raster a shape is cut from for the rest (h is ignored there); for a circle w is the number of rings, and for a hexagon the radius, and for a pyramid the rows.

例

import { gridOf } from "@johnmorrisdotca/meikyuu";

console.log(gridOf("heart",9,9).cells);
52

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

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

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