pairsLeft関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The tiles left on a layout as pairs that match, each pair's tiles together: what a shuffle lays again.
インポート
import { pairsLeft } from "@johnmorrisdotca/jarajara";
定義
function pairsLeft(cells: MahjongCells, rule: MahjongBonusRule): [string, string][]
引数
| 名前 | 型 | 説明 |
|---|---|---|
cells | string | The face-code string in native slot order; dot marks a removed tile. |
rule | MahjongBonusRule | Grouped or identical bonus matching. |
戻り値
[string, string][]
The tiles left on a layout as pairs that match, each pair's tiles together: what a shuffle lays again.
例
import { generateAwase } from "@johnmorrisdotca/jarajara/awase";
import { pairsLeft } from "@johnmorrisdotca/jarajara";
const deal = generateAwase(4,"easy",2026);
const cells = deal.givens;
console.log(pairsLeft(cells,"group"));[ [ 'B', 'B' ], [ 'D', 'D' ], [ 'N', 'P' ], [ 'x', 'x' ] ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。