本文へ移動

Kumimoji組み文字

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

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

目次

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

kumimojiRefusal関数

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

A refusal: { ok: false }, the English reason (the clause of the code with the values in its gaps), the code and the values.

インポート

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

定義

function kumimojiRefusal(code: KumimojiCheckCode, values?: KumimojiCheckValues): Extract<KumimojiCheck, { ok: false; }>

引数

名前型説明
code"no-hand" | "givens-not-bag" | "wild-count-wrong" | "bag-exceeds-set" | "answer-not-grid" | "grid-not-the-bag" | "tiles-apart" | "not-a-word" | "grid-not-finished"

Why the grid is not taken.

values (省略可)Readonly<Record<string, string | number>> | undefined

What fills the clause's gaps, where it has any.

戻り値

{ ok: false; reason: string; code: KumimojiCheckCode; values?: KumimojiCheckValues; }

The refusal checkKumimoji gives.

例

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

console.log(kumimojiRefusal("not-a-word", { word: "aow" }));
{
  ok: false,
  reason: 'aow is not in the word list',
  code: 'not-a-word',
  values: { word: 'aow' }
}

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

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

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