Use DreamDict for Wordle word selection, expand to 20 letters, fix WOTD English word leak

Wordle:
- Use DreamDict RandomWord API as primary word source, local pools as fallback
- Expand word length support from 5-7 to 5-20
- Validate DreamDict words are correct length and alpha-only
- Keep max guesses at 6 regardless of word length
- Use wordleMaxGuesses() instead of hardcoded 6 for rehydration

WOTD:
- Reject non-English candidates that are valid English words (fixes "puzzlingly" as Portuguese WOTD)
- Make cross-language translations optional (DreamDict pt-PT coverage is sparse)
- Use LLM fallback to translate foreign words to English when DreamDict lacks translations
- Remove hasTranslations re-prefetch guard (no longer needed with optional translations)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-04-01 18:58:33 -07:00
parent f61bf89c71
commit b4d5080f48
3 changed files with 158 additions and 78 deletions

View File

@@ -41,7 +41,7 @@ type WordlePuzzle struct {
RoomID id.RoomID
Answer string // uppercased
WordLength int
MaxGuesses int // always 6
MaxGuesses int
Category WordleCategory
Guesses []WordleGuess
Solved bool