movesForRelease関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Every layer a release turns: the picked layer, and the one beside it where the drag took a seam, each by those quarters; none for none.
インポート
import { movesForRelease } from "@johnmorrisdotca/kyuubu";
定義
function movesForRelease(pick: DragPick, quarters: number): CubeMove[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
pick | DragPick | The layer and screen direction selected by a drag. |
quarters | number | The signed number of quarter turns on release; 0 cancels the move. |
戻り値
CubeMove[]
Every layer a release turns: the picked layer, and the one beside it where the drag took a seam, each by those quarters; none for none.
例
import { movesForRelease } from "@johnmorrisdotca/kyuubu";
const pick = { axis: 0 as const, layer: 2, along: [1, 0] as [number, number] };
console.log(movesForRelease(pick, 1));[ { axis: 0, layer: 2, turns: 1 } ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。