village-builder

VB-293: Marriage offers: each match is an offer both households answer, the player’s among them

Status: done (2026-11-10) Priority: 2 Size: M Arch: life Phase: implement Design ref: Inheritance, expansion and other bodies (Marriage as a negotiation: The offer, Who negotiates, Consent, The player’s doors; Leaving home); The player and what they see (Marriage). Survey and plan: backlog/VB-233.md. Goal: The moving round’s matcher (marriageRound, src/sim/lifecycle.js) marries each pair it finds at once, so the player has no say. Make each match an offer that the two who marry and their spokesmen answer. A side that is not the player answers yes at once, so a run with no player is unchanged. An offer the player must answer waits up to 7 game days, as plain data with a due time in st.offers, and the world goes on meanwhile. This is the first question answered through Decisions.answer (here Sim.answer; slice 5’s Decisions module takes it over). Acceptance criteria:

Impact note (for the PR). Size M, two new state fields. Reads: the round’s pool, places and homes (unchanged), st.player (the played pawn), the household’s holder, its spouse and parents (spokesmanOf). Writes: st.offers and st.offerSeq (owner sim/lifecycle, in src/owners.json; planned to move to slice 5’s Decisions), the record (offered, matchRefused, offerLapsed), a spokesman’s relation record (refusedMatch, through sim/relations’ remember). New coupling: sim/clock’s day’s end calls dueOffers (sim/lifecycle) after the daily life and births; sim/commands’ verb answer calls sim/lifecycle’s cannotAnswer and answerOffer through later, as marry calls wed; sim/notable’s skip reads st.offers. No new module: the offer is the round’s (the matcher’s marry call), and its close is the marriage and the handover the round already makes, so it stays beside them; lifecycle.js is at 397 of its 400 lines. The round’s handover rule is one function, handover(st, hh, rank), called by the round for every household and by an offer’s close for its home (VB-277 calls it for a village’s farms).

Implementation (10 Nov 2026, VB-293):

Validation (10 Nov 2026):