handSpelling関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The hand with word's tiles first, in its order, and the rest after them as they were.
インポート
import { handSpelling } from "@johnmorrisdotca/kumimoji";
定義
function handSpelling(play: TilePlay, word: string): TilePlay
引数
| 名前 | 型 | 説明 |
|---|---|---|
play | TilePlay | The current immutable solo-game progress. |
word | string | The encoded word to lay or spell. |
戻り値
TilePlay
The hand with word's tiles first, in its order, and the rest after them as they were.
例
import { deal, handSpelling } from "@johnmorrisdotca/kumimoji";
const tiles = new Map([["0,0","c"],["0,1","a"],["0,2","t"]]);
const play = deal("catdog",3);
console.log(handSpelling(play,"cat").tiles);Map(0) {}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。