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

startWordGamefunction

A new round: nothing guessed, nothing typed. The hidden word is as the list gives it (lower case letters, or kana).

Import it

import { startWordGame } from "@johnmorrisdotca/kotoba";

Definition

function startWordGame(language: WordGameLanguage, size: number, hidden: string, rows?: number): WordGame

Parameters

NameTypeDescription
languageWordGameLanguage

The native game language.

sizenumber

The number of letters or kana in each word.

hiddenstring

The hidden word in native lowercase letters or kana.

rows (optional)number

The number of guesses the game permits.

Returns

WordGame

A new round: nothing guessed, nothing typed. The hidden word is as the list gives it (lower case letters, or kana).

Examples

import { startWordGame } from "@johnmorrisdotca/kotoba";

console.log(startWordGame("en",5,"apple").status);
playing

What it prints (run when this page was built)

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