What it does
createLetterGrid rolls a board from a seed. Without dice, letters are drawn by how often they appear in the word
list, with a fifth of the tiles vowels at least and Q shown as a QU tile; with dice, your dice are shuffled into the
tiles and each shows a face. Before play starts the pack solves the board, walking every path that is still the start
of a word, and with minWords it rolls again until the board holds enough words, keeping the richest it found.
A word is a chain of touching tiles, each used once. canExtend says whether a drag may go on to a tile, isPrefix
whether the trace so far is on its way to a word, check whether it would score, and trace submits it. A typed word
is accepted when the board can spell it: the pack finds the path. Every refusal has a reason a player can be shown.
The round's clock is game time: call advance from your step and the round ends when its time is used. At the end,
observation() lists every word not found, longest first, each with a path to draw. A round is a seed and a list of
moves on the kernel history, so saves and replays come free, and undo takes back a word without giving time back.
Features
- Seeded boards — the same seed always rolls the same board, for a daily board or a fair rematch.
- A rich board on demand —
minWordsrolls again until the board holds enough words. - Dice or frequency — your own letter dice, multi-letter faces included, or letters weighted by the word list.
- Any size — four by four, six by six, or any shape of board, including one you set.
- Neighbours and wrapping — sides and corners, sides only, and edges that wrap round.
- Trace or type — drag through the tiles or type the word; the pack finds the path.
- Live checks — whether a drag may continue and whether the trace is on its way to a word.
- Scoring — the classic length table, a point a letter, your own table or function.
- The clock — any number of seconds, or none.
- Every word on the board —
solve,hintand the missed list at the end, each with a path. - Shared rounds —
scoreSharedcancels words two or more players found.
Good for
- Classic timed word hunts, four by four in three minutes.
- Big relaxed boards, six by six with no clock and four-letter words.
- Daily boards, one seed for everyone and a list of what they missed.
- Pass-and-play and party games, scored so shared words count for nobody.
- Spelling practice, side-only neighbours and a gentle board for younger players.
Make it yours
A round takes its width and height (or a set board), the words that count, minLength, dice or frequency
letters with minVowels, qu, minWords, adjacency, wrap, scoring and time. The pack draws nothing, so the
tiles, the trace line and the word list are yours.
Two materially different rounds: the classic four by four, three minutes, three-letter words and the 1-1-2-3-5-11 scoring; and a six by six board whose edges wrap round, four-letter words only, a point a letter and no clock. A third uses your own letter dice with multi-letter faces such as TH and ER.
A quick look
A round, a trace and the clock:
const round = createLetterGrid({ seed, minWords: 40 }); // 4×4, 3 minutes
const view = round.observation(); // tiles, found words, score, time left
round.canExtend(path, tile); // may a drag go on to this tile?
round.isPrefix(path); // is the trace on its way to a word?
round.trace(path); // submit tiles [i, j, k…], index y * width + x
round.type('stone'); // or type a word: the pack finds its path
round.advance(dt); // from the game's step; the round ends at 0
Works with
letter-tiles— draws the tiles and the trace through them, with effects from a clean line to fire.english-words— required: the words that count, letter frequencies and the solver's prefix checks.typography— for the letters, the current word and the found list.word-search— when the words should be hidden in straight lines instead.letter-wheel— when one word's letters should spell many words.
Good to know
- It is the rules only: the game draws the board and turns pointer positions into tiles.
- Large boards with wrapping edges and a high
minWordstake longer to roll, since every board tried is solved. - A typed word scores along the first path the pack finds.
- There is no network play;
scoreSharedscores lists your game gathered.






