No description
  • Rust 98.3%
  • HTML 1.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Benno Richters 6d69817e24 Add open-budget: production-funded cap on expansion
Closes the produce->budget->open loop. App.open_budget is one shared pool equal
to last turn's total production, drawn down by every open (the player's manual
'a' and AI explore). Each worker also gets a per-turn budget_cap -- a limit on
its draw from the pool, not a separate purse -- assigned top-down by
ai::divide_budget: the root holds the whole total and each manager splits its
cap equally among its reports. An open requires treasury and pool and the
worker's cap to cover the cost, decrementing pool and cap (and treasury).

Production timing is cleaned up: a new Worker.produced_last holds the previous
turn's production, snapshotted from `produced` at the turn boundary in end_turn;
the quota reads produced_last and the budget total sums it (replacing the old
in-run_ai snapshot that mixed interactive and pass-2 production).

Treasury stays the stock; the budget is the per-turn flow cap, so a rich
treasury can't outrun production. The dashboard shows the open budget and
over-budget opens are rejected. Turn 1 is produce-first (no prior production).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 15:07:28 +02:00
notes Add open-budget: production-funded cap on expansion 2026-06-25 15:07:28 +02:00
src Add open-budget: production-funded cap on expansion 2026-06-25 15:07:28 +02:00
.gitignore Add Save/Resume: snapshot game state to timestamped JSON 2026-06-23 14:40:17 +02:00
Cargo.lock Add Save/Resume: snapshot game state to timestamped JSON 2026-06-23 14:40:17 +02:00
Cargo.toml Add Save/Resume: snapshot game state to timestamped JSON 2026-06-23 14:40:17 +02:00
CLAUDE.md Tighten Architecture prose in CLAUDE.md 2026-06-24 08:47:39 +02:00
LICENSE Add MIT License to the project 2026-01-29 18:02:33 +01:00
rust-toolchain.toml Pin Rust toolchain to 1.96 2026-06-03 18:15:09 +02:00