Skip to the content

Kotoba言葉

Load only the word lists you need, mark repeated letters correctly and play a daily or seeded word game.

Kotoba is the Japanese word for words. About the name

Contents

Reference · Marking, scores and game rules

KanaScoretype

The word-score components with the additional same-kana-family column component.

Import it

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

Definition

type KanaScore = WordScore & {
    column: number;
};

Members

NameTypeDescription
placednumber
elsewherenumber
foundnumber
speednumber
totalnumber
columnnumber

Examples

import type { KanaScore } from "@johnmorrisdotca/kotoba";
import { kanaScore } from "@johnmorrisdotca/kotoba";

const value: KanaScore = kanaScore("はな",["はな"],6,20000);
console.log(value);
{
  placed: 120,
  elsewhere: 0,
  column: 0,
  found: 245,
  speed: 50,
  total: 415
}

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kotoba 1.2.0.