rotationsOf関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Every way a piece can face, each once and in order: one for a cross, two for a straight, four for the rest.
インポート
import { rotationsOf } from "@johnmorrisdotca/suido";
定義
function rotationsOf(mask: number): number[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
mask | number | A pipe mask: north 1, east 2, south 4 and west 8. |
戻り値
number[]
Every way a piece can face, each once and in order: one for a cross, two for a straight, four for the rest.
例
import { rotationsOf } from "@johnmorrisdotca/suido";
console.log(rotationsOf(5));[ 5, 10 ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。