Reference · Rules, tiles and records
liftToHandfunction
A tile on the table back to the end of the hand.
Import it
import { liftToHand } from "@johnmorrisdotca/kumimoji";
Definition
function liftToHand(play: TilePlay, square: string): TilePlay
Parameters
| Name | Type | Description |
|---|---|---|
play | TilePlay | The current immutable solo-game progress. |
square | string | The row,column square name. |
Returns
TilePlay
A tile on the table back to the end of the hand.
Examples
import { deal, liftToHand, placeFromHand } from "@johnmorrisdotca/kumimoji";
const laid = placeFromHand(deal("catdog",3),0,"0,0");
console.log(liftToHand(laid,"0,0").hand);[ 'a', 't', 'c' ]What it prints (run when this page was built)