bigShapeOf関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Which shape four masks make, and the fewest quarters clockwise from the shape's own facing (BigShape.masks) that bring it to them;
null for four masks that are none of the 699: a blank cell, a ring, a pipe with no opening to the outside.
インポート
import { bigShapeOf } from "@johnmorrisdotca/suido";
定義
function bigShapeOf(masks: readonly number[]): { shape: BigShape; quarters: number; } | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
masks | readonly number[] | Current pipe masks in row-major cell order. |
戻り値
{ shape: BigShape; quarters: number; } | null
Which shape four masks make, and the fewest quarters clockwise from the shape's own facing (BigShape.masks) that bring it to them; null for four masks that are none of the 699: a blank cell, a ring, a pipe with no opening to the outside.
例
import { bigMasksOf, bigShapeOf } from "@johnmorrisdotca/suido";
console.log(bigShapeOf(bigMasksOf("elbow",0))?.shape.id);53a3出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。