Reference · Rules, tiles and records
assignTableTilefunction
Give a tile on the table its chosen reading, without changing its square.
Import it
import { assignTableTile } from "@johnmorrisdotca/kumimoji";
Definition
function assignTableTile(play: TilePlay, square: string, face: string): TilePlay
Parameters
| Name | Type | Description |
|---|---|---|
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. |
Returns
TilePlay
Give a tile on the table its chosen reading, without changing its square.
Examples
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' }What it prints (run when this page was built)