placeFromHand関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A tile from the hand onto an empty square.
インポート
import { placeFromHand } from "@johnmorrisdotca/kumimoji";
定義
function placeFromHand(play: TilePlay, handAt: number, square: string): TilePlay
引数
| 名前 | 型 | 説明 |
|---|---|---|
play | TilePlay | The current immutable solo-game progress. |
handAt | number | The zero-based index of a tile in hand. |
square | string | The row,column square name. |
戻り値
TilePlay
A tile from the hand onto an empty square.
例
import { deal, placeFromHand } from "@johnmorrisdotca/kumimoji";
const tiles = new Map([["0,0","c"],["0,1","a"],["0,2","t"]]);
const play = deal("catdog",3);
console.log(placeFromHand(play,0,"0,0").tiles.size);1出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。