deal関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The opening hand: the first handSize tiles of the bag, and an empty table.
インポート
import { deal } from "@johnmorrisdotca/kumimoji";
定義
function deal(bag: string, handSize: number): TilePlay
引数
| 名前 | 型 | 説明 |
|---|---|---|
bag | string | The original bag in draw order. |
handSize | number | The initial number of tiles to draw. |
戻り値
TilePlay
The opening hand: the first handSize tiles of the bag, and an empty table.
例
import { deal } from "@johnmorrisdotca/kumimoji";
console.log(deal("catdog",3));{
bag: 'catdog',
returned: '',
taken: 3,
tiles: Map(0) {},
hand: [ 'c', 'a', 't' ]
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。