Games overhaul: legibility, stat variety, GeoDraft rounds, small-state picking, Alphabet combo - #32
Merged
Merged
Conversation
Feedback: "super hard to see the category being displayed and the timer countdown to pick." Both were structural: - The big legible category text was animation-only (the 1.3s center pop), gone during the actual pick phase; the only persistent reference was a crowded ellipsized bar prompt (Arcade) or a small 17px orange-on-dark title (GeoDraft). - The timer was a 5px bar with NO numeric readout in either game. Changes (shared components → every game inherits): - Added a persistent, full-width prompt banner under the Arcade game bar (#arcadeBanner) that stays for the whole prompt, with the stat description as a muted second line for Stat Duel / Rank It. The center pop stays as the attention-getter. - Enlarged GeoDraft's category title to 22px near-white with an orange left-accent + surface background (was 17px orange-on-dark), raised the description contrast. - Rebuilt the shared timer row: fill bar + a tabular numeric "Ns" readout that decrements and turns red in the final 25% — fixes Arcade, GeoDraft, Speed Run and Find the State at once. Verified in a real browser: banner shows the live prompt and is visible; timer reads seconds and decrements (8s→7s). validate: both blocks PASS (Block 1 untouched 34,471). smoke: 9 routes clean.
Feedback: "Stat Duel — only one stat appeared every round every game" and
"Rank It ... more stats." Root cause: the run locked ONE dataset (picked
once at start) and reused it for every round; if the Census API was down,
every run fell back to a single static "Total Area" stat.
Now each round carries its own {dataset, data}:
- arcadeStartRun cycles a shuffled pool of stats and builds one pair/quad
per round from that round's stat; the prompt, pop, banner and scoring all
read the per-round dataset (with AG.duelDataset/Data kept as a back-compat
pointer to round 1).
- New combined pool = live Census `duel:true` stats + an offline TRIVIA pool
(area, high point, elevation, coastline, counties, electoral votes,
presidents born, national parks, bordering states, statehood year) built
via a LAZY accessor (arcadeTriviaStats) so it never trips the TDZ rule.
- Robust fallback: a failed census stat is skipped, not fatal — trivia keeps
the run varied even with /api/census down (no more "one stat" dead-end).
- Enabled `duel:true` on 13 more rankable census datasets (population,
median age, home value, commute time, broadband, homeownership, etc.).
Verified in a browser: Stat Duel = 10/10 distinct stats per run, Rank It =
6/6; with census unreachable the run fills entirely from varied trivia.
validate: both blocks PASS (Block 1 untouched). smoke: 9 routes clean.
Feedback: "Drop the study up button." Removed the Practice card from the GeoDraft hub so Category Draft and Territory Draft are the two focused entry points. The /games/draft/practice route stays wired but has no hub entry point now (harmless; a future cleanup can remove it).
Feedback: "GeoDraft has the most potential but was the biggest letdown ... the payoff of only 3 categories after drafting 25 states each is a huge letdown — there needs to be way more." Reworked Territory from "50 blind picks -> 3 binary sum-comparisons at the end" into 5 themed rounds: - Each round both sides draft 5 states (alternating, you first). After the round, its hidden category is revealed and scored on THAT round's 5 picks. - Per-round reveal card: category + description + rule, your total vs AI with the exact margin, an MVP callout (your strongest pick that round), and a running rounds-won tally with per-round dots. - Win the most of 5 rounds to take the map; the final screen lists every round's winner. Feedback now lands every round instead of all at the end. - Reuses the totals the engine already computed; the category loop now takes 5 (was 3). Copy (hub card + how-to) updated to match. Verified in a browser: full 5-round match drives cleanly — 5 distinct categories revealed round-by-round, 25 picks each side, running tally and final breakdown correct, no errors. validate + smoke green.
Feedback: "maybe an easier way overall to choose the small states too." Small states (RI/DE/CT/NJ/NH/VT/MA/MD/HI) are tiny polygons that are hard to tap on a phone. Added two mechanisms to Territory Draft: - "Pick from list": a toggleable panel of the remaining states as big (44px) tappable chips, sorted alphabetically, with the small/hard states accent-highlighted. Tapping a chip claims that state through the same path as a map tap and updates live as picks happen. - "NE" region-zoom button: frames the small Northeast cluster using the existing makeMapZoom zoomToPaths() helper so the tiny states blow up big enough to tap on the map directly. Verified in a browser: list shows 50 chips (9 small ones highlighted), tapping Rhode Island claims it and drops it from the list, NE button zooms 1x->4x. (Category Draft only drafts 3 states/round so it's far less affected; it can get the same helpers in a follow-up.) validate + smoke green.
Feedback: "Alphabet Race needs more to it but was unexpectedly fun." It was one tap per letter — effectively a disguised single find. Now it has depth: - Name-as-many: each letter, tap AS MANY valid states as you can before the clock. Every state builds a combo (each worth more than the last, via arcadeAlphaTap), and clearing every state for the letter pays a bonus + remaining-time bonus. A live "N of M found" counter shows in the banner. - Invalid taps flash but don't end the round (forgiving); the round ends on timeout or when the letter is cleared. Missed states are revealed to learn. - Difficulty ramp: the 10 letters are ordered easy→hard (many-answer letters first, single-answer last) and the per-round clock shortens 10s→~5s as the run progresses; later letters also pay a round multiplier. Medals rebalanced. New engine paths: arcadeAlphaTap / arcadeResolveAlpha (alpha no longer routes through the single-tap arcadeResolve), arcadeStartTimer honors a per-prompt AG.promptSecs override. Verified in a browser: easy→hard ordering, combo scoring (12 then 18), live counter, invalid taps ignored, clear resolves. validate + smoke green.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
A games UX/UI + mode-depth overhaul driven by play-test feedback (played all five games). Six commits, each self-contained, validated and verified in a real browser via Playwright. All work is in
index.html; no API changes; the games stay isolated from the export-critical editor path.Plan:
/root/.claude/plans/graceful-dazzling-mango.md(approved).The feedback → what changed
A · Legibility — "super hard to see the category being displayed and the timer countdown."
B · Stat Duel + Rank It — "only one stat appeared every round every game" / "more stats."
duel:trueon 13 more census datasets. (Built via a lazy accessor to respect the TDZ rule.)C1 · GeoDraft — "drop the study up button." Removed the Practice hub card.
C2 · Territory Draft — "biggest letdown … only 3 categories after drafting 25 states each … needs way more."
C3 · Small states — "an easier way to choose the small states too." Both mechanisms, in Territory:
zoomToPaths()).D · Alphabet Race — "needs more to it but was unexpectedly fun."
Verification
npm run validate→ both blocks PASS (Block 1 untouched at 34,471 chars; games never touch it)npm run smoke(viaSMOKE_CHROMIUM) → all 9 routes boot cleanNotes
CENSUS_API_KEYis set in Vercel. If it isn't, the new trivia pool keeps the games varied regardless — but live stats won't show until the key is configured, so it's worth confirming.🤖 Generated with Claude Code
https://claude.ai/code/session_0136LsmUduBGCuJ8wg9PDhN6
Generated by Claude Code