The win probability sparkline component is now fully integrated: 1. Worker (engine/winprob.go): Monte Carlo rollout computes per-turn win probabilities, detectCriticalMoments identifies turns where win prob shifts >15% with template-based descriptions. 2. Replay storage (engine/replay.go): win_prob and critical_moments arrays stored in replay JSON, written by match worker after each match. 3. Web component (web/src/components/win-prob.ts): WinProbSparkline class renders the graph with critical moment markers (dashed vertical lines), click-to-scrub interaction, and current turn indicator. 4. Replay page integration (web/src/pages/replay.ts): initWinProb() sets up the sparkline with player colors, legend, prev/next critical moment navigation buttons, and keyboard shortcuts ([/]). The sparkline displays one line per player with area fill gradient, percentage labels (0%, 50%, 100%), critical moment diamonds with delta labels, and updates in real-time as the replay plays.
1 line
41 B
Text
1 line
41 B
Text
1e66df51ed4cf34c6aa3db3f4d73e7a6a9868d53
|