magicciv/public/games
Natalie 507a87104f feat(@projects/@magic-civilization): 👁️ p3-25 step 5 — project real trade deals into view_json (DiplomacyView.trade_deals)
view_json now carries real inter-player trades — the headless "simulator provides
everything" goal is met. A player-like the headless adapter sees territory (step 2) AND
trades (this step) from the projected view, no GDScript re-derivation.

- view.rs: DiplomacyView gains trade_deals: Vec<TradeDealView> ({kind, you_receive,
  you_give, gold_per_turn}, described from the viewer's perspective; serde skip-if-empty
  for wire stability).
- projection.rs build_diplomacy: populates trade_deals from the persisted
  state.trade_ledger swap/sale agreements (LuxurySwap/StrategicSwap/ResourceSale) for the
  viewer↔counterpart pair, via swap_deal_view/sale_deal_view helpers (correct give/receive
  direction; sale gold signed + for seller, − for buyer).

Verified: projection_surfaces_trade_deals_from_ledger (luxury swap direction + sale
buyer/gold); mc-player-api 171/0. (Disk filled mid-step from cargo target — cargo clean
reclaimed 9.5GiB; tests re-run from a clean build.)

p3-25 steps 1-5 DONE: view_json now carries territory + real trades, sourced fully in
Rust. Step 6 (live game adopts the unified PlayerView) reframed as a large separate
follow-on — the headless view-completeness this objective targets is achieved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 02:04:57 -04:00
..
age-of-dwarves feat(@projects/@magic-civilization): 👁️ p3-25 step 5 — project real trade deals into view_json (DiplomacyView.trade_deals) 2026-06-26 02:04:57 -04:00
age-of-elves/guide fix(@projects): 🐛 update deployment and guide workflows 2026-06-10 03:38:03 -07:00
age-of-kzzkyt/guide fix(@projects): 🐛 update deployment and guide workflows 2026-06-10 03:38:03 -07:00
sandbox