Skip to content

steeb-k/alphabox

 
 

Repository files navigation

AlphaBox

Open-source implementation of Letter Boxed including puzzle generation and solver.

Now that the original game has been placed behind a paywall, I created this fork of Litter Boxed and have started adding new features, including..

  • Dark mode support (and theming override)
  • Improved puzzle solving validation
  • Random game generator for infinite play
  • View solutions for any generated puzzle
  • Smooth animations
  • A "par" system similar to what you have in the original game
  • Streak tracking

Screenshot

Trivia

  • Puzzle generation is ensured in the browser.
  • Two different lists are used: an easy list so that puzzles have a simple solution and a complete list for input validation.
  • Daily puzzles are generated by seeding the random generator with the date.
  • Unlike the NYT puzzles, we guarantee that there is always a solution with two words that repeats only the common letter (e.g. LANDS > SECURITY).

More trivia

  • Puzzle generation is done by sampling two words (in O(1)) then checking whether the letters can be arranged on a square.

    • It would be OK to enumerate the 12!/(3!^4*4!) = 15 400 possibilities, but to be more efficient, we adapted Ali Aassaf's Algorithm X in JavaScript.
  • Puzzle solving is pretty boring:

    • Select words that can be written in the grid
    • For each letter, bruteforce the pairs of words that begin/end with this letter

About

Open-source implementation of Letter Boxed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Svelte 60.6%
  • CSS 17.4%
  • JavaScript 15.9%
  • Python 5.7%
  • HTML 0.4%