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
gridstyling (container_style+CELL_BOX_STYLE) withtouch-action: manipulation. HotColdResult { found, probes_used, par }— host mapsprobes_usedto time/days lost;paris 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 changingkeyto remount it — in this Dioxus version akeychange 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_coldfeature (+all), module/doc,gridcfg gate; version0.1.4 → 0.1.5.examples/hot_cold/(new standalone crate) —just example hot_cold.justfile—hot-coldrecipe.
Verification
cargo test -p minigames-kit— 43 pass;cargo clippy --all-featuresclean;cargo check --workspaceclean.- 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
Links to this note
Merged pull requests, newest first.