/* ===================================================================== DUNK CONTEST — Sport on Earth Games arcade Single-file canvas game in the Family Arcade house style. EMBED (inline):
CONTROLS: hold the ACTION button (or hold Space) to start the run-up, release inside the striped takeoff zone to launch, then press ACTION / Space once during the flight to lock your trick on the timing bar. Start / Restart with the Start button. SCORING: each dunk = round(takeoff quality x 20 + trick base + timing bonus), capped at 50. Trick bases: 360 Windmill 20, Between the Legs 16, Windmill 12, Two-Hand Jam 8, Basic Jam 5. Timing bonus up to 10 for a dead-centre lock. Overrunning the zone caps the dunk at 18; a takeoff quality under 0.15 rims out. Three dunks, max total 150. FIXES (Oct 14 PM): flight slowed to 1.0s and the gold window widened to ±7.5% so the trick lock is hittable on touch; a pointer released outside the canvas/button now still takes off (window-level pointerup); Start/Save buttons blur after click so Space/Enter can never re-trigger them mid-contest; the ACTION button label follows the phase, the run-up calls the takeoff zone as you enter/leave it, and the judges add a one-line verdict. ===================================================================== */ (function () { "use strict"; /* ================= LEADERBOARD BACKEND — UPGRADE HOOK ================= Default: LOCAL board (localStorage top-10) so the game runs standalone. To switch to the shared family KV leaderboard later, set KV_ENABLED to true. The site must then serve the paper's functions/api/arcade.js with "dunk-contest" added to its GAMES list and ARCADE_KV bound — the fetch calls below already mirror that API exactly: GET /api/arcade/leaderboard?game=