freshAwaseSeed関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A new seed for a deal under this rule: inside AWASE_SAME_BLOCK for the identical rule, anywhere else from 1 to
SEED_MOST for the usual one. draw gives a seed for the usual rule (a site keeping blocks of seeds for its own
uses passes its own); a whole number from 1 to SEED_MOST unless said.
インポート
import { freshAwaseSeed } from "@johnmorrisdotca/jarajara/awase";
定義
function freshAwaseSeed(rule: MahjongBonusRule, random?: Random, draw?: () => number): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
rule | MahjongBonusRule | Grouped or identical bonus matching. |
random (省略可) | Random | A reproducible random source returning values in [0,1). |
draw (省略可) | () => number | An optional function drawing a seed outside separately reserved blocks. |
戻り値
number
A new seed for a deal under this rule: inside AWASE_SAME_BLOCK for the identical rule, anywhere else from 1 to SEED_MOST for the usual one. draw gives a seed for the usual rule (a site keeping blocks of seeds for its own uses passes its own); a whole number from 1 to SEED_MOST unless said.
例
import { freshAwaseSeed } from "@johnmorrisdotca/jarajara/awase";
import { seededRandom } from "@johnmorrisdotca/jarajara";
console.log(freshAwaseSeed("same",seededRandom(42)));1560110375出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。