draw関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The next tile or tiles out of the bag into the hand.
インポート
import { draw } from "@johnmorrisdotca/kumimoji";
定義
function draw(play: TilePlay, count?: number): TilePlay
引数
| 名前 | 型 | 説明 |
|---|---|---|
play | TilePlay | The current immutable solo-game progress. |
count (省略可) | number | The number of tiles to draw. |
戻り値
TilePlay
The next tile or tiles out of the bag into the hand.
例
import { deal, draw } from "@johnmorrisdotca/kumimoji";
const play = deal("catdog",3);
console.log(draw(play,1).hand);[ 'c', 'a', 't', 'd' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。