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