本文へ移動

Kotoba言葉

必要な単語一覧だけを読み込み、重複する文字を正しく判定し、日替わりやシード付きの単語ゲームを遊べます。

「Kotoba」は「言葉」です。 名前について(英語)

目次

リファレンス · 判定・得点・ゲームのルール

KanaMark型

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

HOW A KANA GUESS IS COLOURED, by John's rules for Gomoji in kana (2026-09-25; the table is in docs/plans/other/WORD-04-kana.md):

  • green: the same kana in this place;
  • green with an arrow: the same kana in this place but the wrong size (↓, っ for つ) or the wrong mark (↑, ば for は) — not found until plain green;
  • orange: the kana is in the word elsewhere, an arrow likewise when its size or mark differs;
  • yellow: the word's kana in this place is not this one but is of its family, the same consonant row of the gojūon (か行, and が with it);
  • grey: none of those.

ー is a character with no family, size or mark: green, orange or grey only. A kana is counted as often as the word holds it, as the English marking is: green first, then orange from left to right from what green left over.

インポート

import type { KanaMark } from "@johnmorrisdotca/kotoba";

定義

type KanaMark = "hit" | "near" | "kin" | "miss";

例

import type { KanaMark } from "@johnmorrisdotca/kotoba";

const value: KanaMark = "kin";
console.log(value);
kin

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

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

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