bonusRuleOf関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The deal's rule, read from the deal itself: a bonus tile dealt twice can
only be the Identical rule, since the usual one deals each flower and season
once. A deal holding no bonus tile plays alike under both, and says group.
インポート
import { bonusRuleOf } from "@johnmorrisdotca/jarajara";
定義
function bonusRuleOf(cells: string): MahjongBonusRule
引数
| 名前 | 型 | 説明 |
|---|---|---|
cells | string | The face-code string in native slot order; dot marks a removed tile. |
戻り値
MahjongBonusRule
The deal's rule, read from the deal itself: a bonus tile dealt twice can only be the Identical rule, since the usual one deals each flower and season once. A deal holding no bonus tile plays alike under both, and says group.
例
import { generateAwase } from "@johnmorrisdotca/jarajara/awase";
import { bonusRuleOf } from "@johnmorrisdotca/jarajara";
const deal = generateAwase(4,"easy",2026);
const cells = deal.givens;
console.log(bonusRuleOf(cells));group出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。