Add Fur Trader: the 1976 BASIC fur-trading classic

Add Fur Trader: the 1976 BASIC fur-trading classic

#2 in Riparion/riparion-retro — merged 2026-06-07

A mobile-first WASM Dioxus port of FUR TRADER by Dan Bachor (BASIC Computer Games, 1976), following the repo conventions in NOTES.md (Hammurabi as the structural model).

Fur Trader — a year-3 expedition journal and sale ledger

Lead a French fur-trading expedition out of Lake Ontario in 1776: each year distribute 190 furs across mink/beaver/ermine/fox, pick one of three forts (Hochelaga / Stadacona / New York — each with its own prices, supply costs, and perils), and survive the trip to sell.

Fidelity

Every price formula, RNG draw order, event threshold (the 20/40/20/20 P=INT(10*RND)+1 ladder), fort cost (160/140/105), the carried New York ermine/beaver prices, the cost-before-event ordering, and the sale arithmetic are ported line-for-line from furtrader.bas. A seeded engine test suite pins each against the original's exact numbers, plus a 200-seed scripted smoke run asserting invariants.

Deviations from the listing (documented in the game README)

  • Fort Stadacona fox price — the original never sets one (a known bug), so fox would sell at a stale price or $0.00; this port rolls $0.80–$1.00.
  • Endings + score — the otherwise-endless year loop gains a Retire ending and a bankruptcy ending (can't raise the $105 for the cheapest expedition); final savings is the score.
  • Allocation — a clamped numeric keypad, so the original's ">190 = cheat" restart can't happen.

Shared code

Money formatting (fmt_dollars / fmt_dollars_compact) lifted into retro-kit rather than kept game-local.

Verification

  • cargo test — all suites green (fur-trader engine + retro-kit), deterministic via seeded RNG.
  • cargo clippy --all-targets — zero warnings.
  • Driven in chromium at 390×844: full year loop, change-your-mind fort flow, mid-pacing & mid-allocation save/reload, and all three game-over paths (retire / killed / bankrupt) reached with no console errors.
  • dx build --release + static-serve smoke clean.

🤖 Generated with Claude Code

Last updated 2026-06-08