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