assignHandTile関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Give a hand tile its chosen reading, without changing which physical tile it is.
インポート
import { assignHandTile } from "@johnmorrisdotca/kumimoji";
定義
function assignHandTile(play: TilePlay, handAt: number, face: string): TilePlay
引数
| 名前 | 型 | 説明 |
|---|---|---|
play | TilePlay | The current immutable solo-game progress. |
handAt | number | The zero-based index of a tile in hand. |
face | string | The visible reading to assign to a wild tile. |
戻り値
TilePlay
Give a hand tile its chosen reading, without changing which physical tile it is.
例
import { assignHandTile, deal } from "@johnmorrisdotca/kumimoji";
console.log(assignHandTile(deal("*atdog",3),0,"c").hand);[ 'c', 'a', 't' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。