Reference · Rules, tiles and records
assignHandTilefunction
Give a hand tile its chosen reading, without changing which physical tile it is.
Import it
import { assignHandTile } from "@johnmorrisdotca/kumimoji";
Definition
function assignHandTile(play: TilePlay, handAt: number, face: string): TilePlay
Parameters
| Name | Type | Description |
|---|---|---|
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. |
Returns
TilePlay
Give a hand tile its chosen reading, without changing which physical tile it is.
Examples
import { assignHandTile, deal } from "@johnmorrisdotca/kumimoji";
console.log(assignHandTile(deal("*atdog",3),0,"c").hand);[ 'c', 'a', 't' ]What it prints (run when this page was built)