Reference · Marking, scores and game rules
shiritoriDistractorScorefunction
How tempting a word that does not continue the chain is, for a game offering wrong answers: 0 for a word that does continue, or holds no kana; 1 for any other; more for one that shares the vowel, or that ends where the chain stands.
Import it
import { shiritoriDistractorScore } from "@johnmorrisdotca/kotoba";
Definition
function shiritoriDistractorScore(reading: string, chainKey: string, rules?: ShiritoriRules): number
Parameters
| Name | Type | Description |
|---|---|---|
reading | string | The reading of the wrong answer. |
chainKey | string | The last word's tail key. |
rules (optional) | ShiritoriRules | House rules; the forgiving ones if left out. |
Returns
number
The score: higher is harder to refuse at speed.
Examples
import { shiritoriDistractorScore } from "@johnmorrisdotca/kotoba";
console.log(shiritoriDistractorScore("かわ", "さ"), shiritoriDistractorScore("きのこ", "さ"));4 1What it prints (run when this page was built)