TILE_MIX定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
THE MIX: how many of each letter a full set holds, 144 tiles in all. This is the letter-frequency table of the best-known anagram-grid tile game, a fact about how often English uses its letters and nobody's rule text. Short and Medium games draw from it; Full uses all 144 tiles. Double uses two copies.
To tune the letters, change the counts here. The total is checked by
tiles.test.ts, so an edit that loses a tile says so.
インポート
import { TILE_MIX } from "@johnmorrisdotca/kumimoji";
定義
const TILE_MIX: Readonly<Record<string, number>> = {
a: 13,
b: 3,
c: 3,
d: 6,
e: 18,
f: 3,
g: 4,
h: 3,
i: 12,
j: 2,
k: 2,
l: 5,
m: 3,
n: 8,
o: 11,
p: 3,
q: 2,
r: 9,
s: 6,
t: 9,
u: 6,
v: 3,
w: 3,
x: 2,
y: 3,
z: 2,
}
例
import { TILE_MIX } from "@johnmorrisdotca/kumimoji";
console.log(TILE_MIX);{
a: 13,
b: 3,
c: 3,
d: 6,
e: 18,
f: 3,
g: 4,
h: 3,
i: 12,
j: 2,
k: 2,
l: 5,
m: 3,
n: 8,
o: 11,
p: 3,
q: 2,
r: 9,
s: 6,
t: 9,
u: 6,
v: 3,
w: 3,
x: 2,
y: 3,
z: 2
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。