minigames-kit: add HotCold search/deduction minigame

minigames-kit: add HotCold search/deduction minigame

#18 in Riparion/riparion-retro — merged 2026-06-10

What

Adds HotCold to minigames-kit — a search/deduction grid minigame, the first kit mechanic that tests inference rather than reaction (QuickDraw), spatial memory (CrowdThreading), tracking (Hunter), or timing (TimingBar).

A target is hidden on the grid; each tap probes a cell and reports a clue — warmer/colder vs. the previous probe, or an absolute distance ring — and the player must find it before a probe budget runs out.

Implements New mechanic 3 from TODO_NEW_MINIGAME.md. Kit-only, matching how SteadyHands and BucketBrigade each landed kit-first; wiring it into Oregon Trail's Ox wanders off / Son gets lost / Unsafe water events is the follow-up.

Design notes

  • First turn-based, clock-free minigame — its cost is probes, not wall-time (the result has no time field), so there's no 20 ms tick loop. Purely tap-driven, fully deterministic from seed + tap history.
  • Touch-first: tap-only, no drag/hover; reuses the shared grid styling (container_style + CELL_BOX_STYLE) with touch-action: manipulation.
  • HotColdResult { found, probes_used, par } — host maps probes_used to time/days lost; par is a bisection-depth benchmark (ring ≤ warmer/colder, so the host has headroom).
  • Chebyshev distance → clean square rings; ring 0 ⇔ the target.
  • Resets the run from inside the component (use_effect + use_reactive!) when its inputs change, rather than trusting a changing key to remount it — in this Dioxus version a key change on a lone component child does not force a remount, so a reused instance would otherwise carry the old probe history forward (the existing demos share this latent round-cycling quirk; the game path is unaffected since each encounter mounts fresh).

Files

  • crates/minigames-kit/src/hot_cold.rs (new) — enums, result, pure helpers, component, 8 unit tests incl. a minimax elimination-solver "test bar".
  • crates/minigames-kit/{Cargo.toml,src/lib.rs}hot_cold feature (+ all), module/doc, grid cfg gate; version 0.1.4 → 0.1.5.
  • examples/hot_cold/ (new standalone crate)just example hot_cold.
  • justfilehot-cold recipe.

Verification

  • cargo test -p minigames-kit — 43 pass; cargo clippy --all-features clean; cargo check --workspace clean.
  • Demo budgets calibrated against the solver (all winnable with good play).
  • Live wasm under a touch-emulated mobile viewport (playwright-core, fresh load): warmer/colder find path (×2 rounds), correct round reset, distance-ring mode, and the budget-loss on_complete(found=false) path all confirmed.

🤖 Generated with Claude Code

Last updated 2026-06-11