本文へ移動

Kumimoji組み文字

シードから配った英字やかなのタイルで、ひとりでも複数人の卓でも、単語を組み合わせて遊べます。

「組み文字」は文字を組み合わせることを表す言葉です。 名前について(英語)

目次

リファレンス · ルール・タイル・記録

checkKumimoji関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

WHETHER A GRID FINISHES A KUMIMOJI: the one check the server also runs. O(squares) and a lookup a word, nothing searched: the grid uses exactly the tiles of the bag, as many of each, it is all one piece, and every run of two or more across or down is in the list — and, for a game set up with Diagonals, every run of three or more along a diagonal. Which tiles were traded on the way does not matter — a finished game holds the whole bag whatever came out of it when — so the answer is the grid alone.

Written out here rather than asked of the play page, which is what made the grid; the list must have been loaded (loadTileWords), and a check that cannot read it refuses.

インポート

import { checkKumimoji } from "@johnmorrisdotca/kumimoji";

定義

function checkKumimoji(size: number, givens: string, answer: string, options?: KumimojiOptions & { level?: KumimojiLevel; }): KumimojiCheck

引数

名前型説明
sizenumber

The supported initial hand size.

givensstring

The original bag of internal tile codes.

answerstring

The encoded completed grid to verify.

options (省略可)KumimojiOptions & { level?: KumimojiLevel; }

Native game, component or presentation options.

戻り値

KumimojiCheck

WHETHER A GRID FINISHES A KUMIMOJI: the one check the server also runs. O(squares) and a lookup a word, nothing searched: the grid uses exactly the tiles of the bag, as many of each, it is all one piece, and every run of two or more across or down is in the list — and, for a game set up with Diagonals, every run of three or more along a diagonal. Which tiles were traded on the way does not matter — a finished game holds the whole bag whatever came out of it when — so the answer is the grid alone.

例

import { checkKumimoji } from "@johnmorrisdotca/kumimoji";
import { loadTileWordsFromModule } from "@johnmorrisdotca/kumimoji/words";

await loadTileWordsFromModule("english");
console.log(checkKumimoji(3,"cat","cat",{level:"hard"}));
{
  ok: false,
  reason: 'the givens are not a bag of tiles',
  code: 'givens-not-bag'
}

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/kumimoji 1.6.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。