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
| Name | Type | Description |
|---|---|---|
language | WordGameLanguage | The native game language. |
size | number | The number of letters or kana in each word. |
hidden | string | 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);playingWhat it prints (run when this page was built)