PLS Crack
FastAPI / Game LogicA no-sign-up code-breaking game. The server picks a hidden sequence of colors; you try to find it before you run out of attempts, using scored feedback to narrow it down.
Product
The Problem
A Mastermind-style guessing game can't be built as a purely client-side page without exposing the secret code in the page's own source.
Overview
A classic code-breaking puzzle that genuinely needs a backend: if the secret code were generated in the browser it would sit in plain sight in the page's JavaScript, so the secret lives server-side and is only revealed once a game has actually ended. Starting a game creates an entry in an in-memory dictionary keyed by an unguessable token (secrets.token_urlsafe) — a capability rather than an identity, so there's nothing to sign up for. Scoring counts exact position-and-color matches first, then, from what's left, counts shared colors without double-counting any single peg — the part of this kind of puzzle that's easy to get subtly wrong when a color repeats, so it's covered by unit tests.
Features
- Configurable code length (3-6), color count (4-8), and attempts (4-12)
- Server-held secret, revealed only when the game ends
- Peg-and-ring scored feedback per guess (exact-match vs. wrong-position)
- Token-based game state — no login, no database, in-memory with automatic cleanup after inactivity
Editions
Free / Open Source
- Configurable difficulty
- Server-authoritative game logic with unit-tested scoring
- No account needed
Live Now
Try It Live