A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
content: dated term parties, sourcing notes for legislatures, population and rules
eyalgolan1fa9107ad5b4
diff --git a/content/legislatures.yaml b/content/legislatures.yamlindex 7642b023b..32ab17328 100644--- a/content/legislatures.yaml+++ b/content/legislatures.yaml@@ -1,6 +1,8 @@legislatures:- id: provisional_state_councilbody: Provisional State Council+ # from/to are derived handover dates: independence (14 May 1948) and the first convening of the Knesset (14 February 1949).+ # Per its article the council was founded 12 April 1948 and last met 3 February 1949.from: 1948-05-14to: 1949-02-14size: 37@@ -28,6 +30,7 @@ legislatures:status: fact-checked- id: first_knessetbody: Constituent Assembly (First Knesset)+ # The Knesset article gives "20 January" for the election, which conflicts; the election article (25 January 1949) is the source used.elected: 1949-01-25from: 1949-02-14size: 120diff --git a/content/people.yaml b/content/people.yamlindex 8cd443dfd..c7e6a3272 100644--- a/content/people.yaml+++ b/content/people.yaml@@ -1,4 +1,5 @@# Offices and dates are historical facts (sourced per term). competence/loyalty are game-balance values, not facts.+# A term's `party` (when set) is the list the holder sat for in that government (First_government_of_Israel); otherwise `party` of the person applies.# Periods are [from, to). Terms without `to` continue beyond the M1 content range (end of 1949).# Portraits: public-domain files fetched with license check (promo/CREDITS.md).people:@@ -51,9 +52,9 @@ people:offices:- { office: health_minister, from: 1948-05-14, to: 1949-03-10, sources: *prov }- { office: immigration_minister, from: 1948-05-14, to: 1949-03-10, sources: *prov }- - { office: health_minister, from: 1949-03-10, sources: *first }- - { office: immigration_minister, from: 1949-03-10, sources: *first }- - { office: interior_minister, from: 1949-03-10, sources: *first }+ - { office: health_minister, from: 1949-03-10, party: united_religious_front, sources: *first }+ - { office: immigration_minister, from: 1949-03-10, party: united_religious_front, sources: *first }+ - { office: interior_minister, from: 1949-03-10, party: united_religious_front, sources: *first }status: fact-checked- id: gruenbaumname: Yitzhak Gruenbaum@@ -72,7 +73,7 @@ people:portrait: { file: promo/ref/people/Pinchas_Rosen.jpg, license: Public domain, source: "https://commons.wikimedia.org/wiki/File:Pinchas_Rosen.jpg" }offices:- { office: justice_minister, from: 1948-05-14, to: 1949-03-10, sources: *prov }- - { office: justice_minister, from: 1949-03-10, sources: *first }+ - { office: justice_minister, from: 1949-03-10, party: progressive, sources: *first }status: fact-checked- id: bentovname: Mordechai Bentov@@ -103,8 +104,8 @@ people:offices:- { office: religions_minister, from: 1948-05-14, to: 1949-03-10, sources: *prov }- { office: war_victims_minister, from: 1948-05-14, to: 1949-03-10, sources: *prov }- - { office: religions_minister, from: 1949-03-10, sources: *first }- - { office: war_victims_minister, from: 1949-03-10, sources: *first }+ - { office: religions_minister, from: 1949-03-10, party: united_religious_front, sources: *first }+ - { office: war_victims_minister, from: 1949-03-10, party: united_religious_front, sources: *first }status: fact-checked- id: bernsteinname: Peretz Bernstein@@ -133,7 +134,7 @@ people:portrait: { file: promo/ref/people/Yitzhak-Meir_Levin.jpg, license: Public domain, source: "https://commons.wikimedia.org/wiki/File:Yitzhak_Meir_Levin.jpg" }offices:- { office: welfare_minister, from: 1948-05-14, to: 1949-03-10, sources: *prov }- - { office: welfare_minister, from: 1949-03-10, sources: *first }+ - { office: welfare_minister, from: 1949-03-10, party: united_religious_front, sources: *first }status: fact-checked- id: dov_yosefname: Dov Yosefdiff --git a/content/population.yaml b/content/population.yamlindex 4e3dd62de..7caa05487 100644--- a/content/population.yaml+++ b/content/population.yaml@@ -1,7 +1,7 @@# Jewish population, CBS Statistical Abstract table 2.1 (thousands, converted).anchors:- date: 1948-11-08- jews: 716700 # census day+ jews: 716700 # date of population registration (CBS)sources: [{ url: "https://www.cbs.gov.il/he/publications/doclib/2023/2.shnatonpopulation/st02_01.pdf", checked: 2026-10-09 }]status: fact-checked- date: 1948-12-31diff --git a/content/rules.yaml b/content/rules.yamlindex 3aaedd261..debae0c0b 100644--- a/content/rules.yaml+++ b/content/rules.yaml@@ -17,6 +17,8 @@ mobilization_cost_per_year: 60natural_increase_per_year: 0.0169# Derived: CBS end-1948 Jewish population 758,700 minus 101,828 immigrants (15 May-31 Dec 1948) minus natural increase over# 7.5 months at the rate above. Checked against the 8 Nov 1948 census by the calibration test.+# Arithmetic: 758,700 - 101,828 = 656,872. Natural-increase base = average of 656,872 and 758,700 = 707,786.+# Natural increase = 707,786 x 0.0169 x 7.5/12 = 7,476. 656,872 - 7,476 = 649,396, rounded to the nearest hundred = 649,400.initial_population: { veterans: 649400 }budget_start:defense_minister: 0.45diff --git a/sim/Statecraft.Sim.Tests/ContentLoaderTests.cs b/sim/Statecraft.Sim.Tests/ContentLoaderTests.csindex 11df83c81..79b7b4fd6 100644--- a/sim/Statecraft.Sim.Tests/ContentLoaderTests.cs+++ b/sim/Statecraft.Sim.Tests/ContentLoaderTests.cs@@ -57,6 +57,16 @@ public class ContentLoaderTestsAssert.Equal("people[def_two].offices.treasury_boss", ex.Field);}+ [Fact]+ public void OfficeTermPartyMustExist()+ {+ var bad = Fixture.Files["people.yaml"].Replace(" - office: finance_minister\n", " - office: finance_minister\n party: gamma\n");+ Assert.NotEqual(Fixture.Files["people.yaml"], bad);+ var ex = Assert.Throws<ContentException>(() => ContentLoader.Load(Fixture.Write(new Dictionary<string, string> { ["people.yaml"] = bad })));+ Assert.Equal("people.yaml", ex.File);+ Assert.Equal("people[def_two].offices.finance_minister.party", ex.Field);+ }+[Fact]public void OfficeTermEndingBeforeItStartsIsAnError(){diff --git a/sim/Statecraft.Sim.Tests/RealContentTests.cs b/sim/Statecraft.Sim.Tests/RealContentTests.csindex f26bf7f47..8f7ea4c4d 100644--- a/sim/Statecraft.Sim.Tests/RealContentTests.cs+++ b/sim/Statecraft.Sim.Tests/RealContentTests.cs@@ -54,6 +54,20 @@ public class RealContentTests}}+ [Fact]+ public void PartyFollowsTheTermHeldOnTheDate()+ {+ var rosen = C.People.Single(p => p.Id == "rosen");+ Assert.Equal("new_aliyah", Offices.PartyOf(C, rosen, new DateTime(1948, 6, 1)));+ Assert.Equal("progressive", Offices.PartyOf(C, rosen, new DateTime(1949, 6, 1)));+ foreach (var id in new[] { "shapira", "maimon", "levin" })+ {+ var p = C.People.Single(x => x.Id == id);+ Assert.Equal(p.Party, Offices.PartyOf(C, p, new DateTime(1948, 6, 1)));+ Assert.Equal("united_religious_front", Offices.PartyOf(C, p, new DateTime(1949, 6, 1)));+ }+ }+[Fact]public void SpotChecksAgainstVerifiedFacts(){diff --git a/sim/Statecraft.Sim/Content.cs b/sim/Statecraft.Sim/Content.csindex 62e4c6e68..89984b572 100644--- a/sim/Statecraft.Sim/Content.cs+++ b/sim/Statecraft.Sim/Content.cs@@ -17,6 +17,8 @@ namespace Statecraft.Simpublic string Office { get; set; } = "";public DateTime From { get; set; }public DateTime? To { get; set; }+ /// <summary>Party the holder represented in this term; empty means Person.Party applies.</summary>+ public string Party { get; set; } = "";public List<Source> Sources { get; set; } = new List<Source>();}diff --git a/sim/Statecraft.Sim/ContentLoader.cs b/sim/Statecraft.Sim/ContentLoader.csindex 167e56979..5f3f61f7d 100644--- a/sim/Statecraft.Sim/ContentLoader.cs+++ b/sim/Statecraft.Sim/ContentLoader.cs@@ -104,6 +104,7 @@ namespace Statecraft.Sim{if (string.IsNullOrEmpty(t.Office)) throw new ContentException("people.yaml", $"people[{p.Id}].offices", "office term without an office");if (!offices.Contains(t.Office)) throw new ContentException("people.yaml", $"people[{p.Id}].offices.{t.Office}", "unknown office");+ if (t.Party != "" && !parties.Contains(t.Party)) throw new ContentException("people.yaml", $"people[{p.Id}].offices.{t.Office}.party", $"unknown party '{t.Party}'");if (t.To.HasValue && t.To.Value <= t.From) throw new ContentException("people.yaml", $"people[{p.Id}].offices.{t.Office}", FormattableString.Invariant($"term ends ({t.To:yyyy-MM-dd}) before it starts ({t.From:yyyy-MM-dd})"));}}diff --git a/sim/Statecraft.Sim/Offices.cs b/sim/Statecraft.Sim/Offices.csindex f41b5d370..27a18970e 100644--- a/sim/Statecraft.Sim/Offices.cs+++ b/sim/Statecraft.Sim/Offices.cs@@ -12,6 +12,10 @@ namespace Statecraft.Simpublic static Person? Holder(Content c, string office, DateTime date) =>c.People.FirstOrDefault(p => p.Offices.Any(t => t.Office == office && In(date, t.From, t.To)));+ /// <summary>Party of the person on date: the party of a term held that day, else Person.Party.</summary>+ public static string PartyOf(Content c, Person p, DateTime date) =>+ p.Offices.FirstOrDefault(t => t.Party != "" && In(date, t.From, t.To))?.Party ?? p.Party;+public static Legislature? Legislature(Content c, DateTime date) =>c.Legislatures.FirstOrDefault(l => In(date, l.From, l.To));