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

WordScoretype

The placed-letter, elsewhere-letter, found-word and speed components and their total.

Import it

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

Definition

type WordScore = {
    placed: number;
    elsewhere: number;
    found: number;
    speed: number;
    total: number;
};

Members

NameTypeDescription
placednumber
elsewherenumber
foundnumber
speednumber
totalnumber

Examples

import type { WordScore } from "@johnmorrisdotca/kotoba";
import { wordScore } from "@johnmorrisdotca/kotoba";

const value: WordScore = wordScore("apple",["alley","apple"],6,20000);
console.log(value);
{ placed: 260, elsewhere: 0, found: 400, speed: 50, total: 710 }

What it prints (run when this page was built)

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