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

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

Описание и применение

Создана безсостояние Wordle‑подобная игра для болельщиков турецкого футбола, где ежедневный игрок определяется только датой, без базы данных.

Задача

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

Результат

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

Рабочий процесс

  • 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.

Доказательства

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.

Источник

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.

Источник

  • Дата записи: 2026-09-07T05:25:34.881Z