React Boxed Word Puzzle

A React-based word puzzle game where players arrange letters to find pairs of words that use all available characters

📅 January 2024💻 TypeScript
ReactTypeScriptTailwind CSSViteReact DnDTrie Data StructureWord Search AlgorithmGitHub Actions
reacttypescriptgame-developmentpuzzlealgorithmsdrag-and-dropword-searchfrontend

A word game in the spirit of letter-boxed puzzles: twelve letters arranged around a square, and the challenge is to find a pair of words that together use all twelve.

The board waiting for letters

The part I enjoyed building is the solver. The dictionary is loaded into a trie, which makes it cheap to walk every candidate word against the available letters; press Solve and it finds the covering word pairs essentially instantly. Watching a data structure from a textbook earn its keep in a hundred lines of TypeScript is its own small pleasure.

Letters are placed by drag and drop — React DnD, with touch support — so it works as comfortably on a phone as on a desktop.