The simple economy is now the default and the old simulation is frozen as the hard model, selectable per game. A nation keeps one resource pool available in every region, fed by public production works rather than private per-region stores, and construction and training begin at once, paced by the region's spare power instead of gathering materials over days. Money is euro only: a per-inhabitant daily tax funds a treasury spent in a global market, where buy and sell lots trade against the world stock and move its price. The hard economy keeps its per-nation currencies, central banks and exchange rates. Simple games skip the price-settling warmup and economic migration; the snapshot carries the economy model, the market and the pool figures the client draws. Added the matching test suites and the design briefs under docs/simple_economy.
2.0 KiB
2.0 KiB
04 — No warmup in the simple economy
Depends on: 01-.
Goal
The simple economy needs no warmup. The server should open directly on the starting scenario.
Current behaviour (hard economy)
server/server.jsreads--warmup(envWARMUP, default150), logs "settling the world...", and passeswarmupDaysinto the setup object.GameServer.configureGame(setup)(server/game_server.js) callsGameState.warmUpToStability({ maxDays })whenwarmupDays > 0, recordsthis.settledDays, and only then callsapplyStartingScenario().GameState.warmUp(days)andwarmUpToStabilitylive inshared/game_state.js/shared/game_state/resources.js. They settle commodity prices (pricesAreSteady,nextMarketPrice) — a hard-economy concept.
Target behaviour
- When
economyModel === "simple", skip the settle entirely:settledDays = 0, nowarmUpToStabilitycall, and apply the starting scenario directly. No UI/market state should depend on a settle having run. --warmupis a hard-economy flag. In simple mode it should be ignored; log a short note if it was explicitly set (rather than silently dropping it). Keep the existing default and behaviour for--economy hard.- Do not remove
warmUp/warmUpToStability; they remain the hard economy's settle and are exercised by existing tests.
Files
server/game_server.js— branch inconfigureGame.server/server.js— passeconomyModelin the setup; adjust the startup log and--warmuphelp text to say it applies to the hard economy.tests/simple_economy_test.jsor the decoupling test — assert a simple game reportssettledDays === 0and that no price-settle ran.
Acceptance criteria
- A simple server starts without the "settling..." phase and
settledDaysis0in the state/snapshot (if it is exposed). - The starting scenario and pool contents are exactly as authored, with nothing spent by a settle.
--economy hard --warmup 0and the default 150 keep working as before.