Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Built a Turkish Wordle for Football Fans: The Deterministic Puzzle Algorithm

Description and use

A stateless Wordle-style daily puzzle for Turkish football fans, where the daily player is derived deterministically from the date, eliminating database dependency.

Problem

Daily puzzle games usually rely on a database to store the daily answer, creating stateful logic and potential sync issues during redeploys.

Outcome

The game runs statelessly, always delivering the same daily puzzle to all users without database writes, and includes a practice mode for unlimited play.

Workflow

  • 1. Construct a seed from the current date (year, month, day).
  • 2. Pass the seed through a small deterministic hash function.
  • 3. Take the hash modulo 198 to get a player index.
  • 4. Retrieve the player from a static dataset of 198 players across 19 clubs.
  • 5. Normalize all player names and guesses (case folding, diacritic stripping).
  • 6. Compare guesses to the target using the normalized strings.
  • 7. Provide feedback on correct letters, correct club, or miss.
  • 8. Offer a practice mode that selects a random player index on each visit.

Evidence

Picking "today's player" never touches a database: the puzzle is generated deterministically from the date itself, so the core game logic stays completely stateless.

Source

Santra's guess-comparison logic is covered by Vitest unit tests that pin down exact matches, partial matches (right club, wrong player, for example), and misses.

Source

  • Record date: 2026-09-07T05:25:34.881Z