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 · Playable game

KotobaNewGametype

What newGame may change: the choices about the word, and nothing about the look.

Import it

import type { KotobaNewGame } from "@johnmorrisdotca/kotoba/play";

Definition

type KotobaNewGame = Pick<KotobaPlayOptions, "words" | "size" | "easy" | "rows" | "seed" | "daily" | "hidden">;

Members

NameTypeDescription
easy (optional)boolean | undefined

Hide only one of the easy answers. Unless said, any answer.

words (optional)WordListName | undefined

The list: English, French, German or Japanese kana. Unless said, English.

size (optional)number | undefined

Letters, or kana, in the word. Unless said, five, or four kana.

rows (optional)number | undefined

How many guesses the round gives. Unless said, six.

seed (optional)number | undefined

A seed: the same seed picks the same word from the same list. Unless said, one is drawn.

daily (optional)string | boolean | undefined

The word of the day (dailyWord) instead of a random one: true for today in UTC, or a day written YYYY-MM-DD. Wins over seed.

hidden (optional)string | undefined

The word to find, whatever the lists say: a friend's, or one from your own source. Wins over daily and seed.

Examples

import type { KotobaNewGame } from "@johnmorrisdotca/kotoba/play";

const value: KotobaNewGame = {words:"en",size:5,seed:42};
console.log(value);
{ words: 'en', size: 5, seed: 42 }

What it prints (run when this page was built)

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