A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
content: revise the 1948 war-period events after review (fix round 1)
eyalgolan401a7b94a175
diff --git a/content/events/altalena.yaml b/content/events/altalena.yamlindex 8db555d38..cb2cdd836 100644--- a/content/events/altalena.yaml+++ b/content/events/altalena.yaml@@ -1,28 +1,30 @@id: altalenatitle: The Altalena-text: 'The Altalena, a ship carrying arms for the Irgun, has reached Kfar Vitkin. The government agreed that a fifth of the arms would go to the Irgun''s battalion in Jerusalem, but Menachem Begin asks that the rest equip Irgun battalions inside the IDF. The government demands that all the weapons be handed over. {defense_minister} must decide.'+text: 'The Altalena, a ship carrying arms for the Irgun, is due at Kfar Vitkin. Begin asks that a fifth of the arms go to the Irgun''s battalion in Jerusalem and the rest to Irgun battalions inside the IDF. {defense_minister} must decide.'anchor: hardtags: [security, war-casualties]office: defense_minister-# 20 June 1948: the ship reached Kfar Vitkin and the government empowered the army to use force if necessary. 21 June:-# Dan Even's ultimatum and fighting at Kfar Vitkin; the ship ran aground off Tel Aviv. 22 June: Ben-Gurion ordered it-# shelled; Yitzhak Rabin commanded on shore. 16 Irgun and 3 IDF dead; Irgun units in the IDF were disbanded and their men-# dispersed (en.wiki "Altalena Affair" and "1948 in Israel" agree). Research notes facts-1948.md section 2.-from: 1948-06-20+# 20 June 1948: the ship reached Kfar Vitkin; the government agreed to Begin's first request (a fifth to the Jerusalem+# battalion), rejected his second as an army within an army, demanded all the weapons and empowered the army to use force+# if necessary. 21 June: Dan Even's ultimatum and fighting at Kfar Vitkin; the ship ran aground off Tel Aviv. 22 June:+# Ben-Gurion ordered it shelled; Yitzhak Rabin commanded on shore. 16 Irgun and 3 IDF dead; Irgun units in the IDF were+# disbanded and their men dispersed (en.wiki "Altalena Affair" and "1948 in Israel" agree). Research notes section 2.+# The window opens on 19 June, the turn date before the arrival (game timing), so the card comes before 20-22 June.+from: 1948-06-19to: 1948-06-23options:- id: enforce- text: Order the army to take the arms, by force if necessary+ text: Grant the Jerusalem share, demand the rest for the IDF, and use force if necessaryhistorical: truerecommended: trueeffects:- - { target: security, delta: 0.03 }+ - { target: security, delta: 0.015 }- { target: morale, delta: -0.05 }- id: compromise- # Begin's second request, put on the table and rejected as an army within an army (en.wiki "Altalena Affair").- text: Give the remaining arms to Irgun battalions inside the IDF+ # Begin's second request, put on the table and rejected (en.wiki "Altalena Affair").+ text: Grant both requests, arming Irgun battalions inside the IDFeffects:- - { target: security, delta: -0.05 }+ - { target: security, delta: -0.025 }- { target: morale, delta: 0.02 }sources:- { url: "https://en.wikipedia.org/wiki/Altalena_Affair", checked: 2026-10-10 }diff --git a/content/events/bernadotte_assassination.yaml b/content/events/bernadotte_assassination.yamlindex 8c7c756ad..f3e882f1a 100644--- a/content/events/bernadotte_assassination.yaml+++ b/content/events/bernadotte_assassination.yaml@@ -19,12 +19,14 @@ options:historical: truerecommended: trueeffects:- - { target: intl_standing, delta: 0.03 }- - { target: security, delta: 0.02 }+ - { target: intl_standing, delta: -0.05 } # the killing itself, shared by both options (notes section 6)+ - { target: intl_standing, delta: 0.03 } # partial recovery from the crackdown+ - { target: security, delta: 0.01 }- id: investigate_only# Game assumption: the notes name no advocate for this option.text: Investigate the killing without a general crackdowneffects:+ - { target: intl_standing, delta: -0.05 } # the killing itself, shared by both options (notes section 6)- { target: intl_standing, delta: -0.10 }sources:- { url: "https://en.wikipedia.org/wiki/Folke_Bernadotte", checked: 2026-10-10 }diff --git a/content/events/elections_1949.yaml b/content/events/elections_1949.yamlindex 8dcaa7b59..87e2052c9 100644--- a/content/events/elections_1949.yaml+++ b/content/events/elections_1949.yaml@@ -1,15 +1,17 @@id: elections_1949title: Electing the Constituent Assembly-text: 'The Declaration of Independence called for elected institutions by 1 October, and the war has already forced the vote to be postponed. The Provisional State Council has set the assembly at 120 seats, elected nationwide by proportional representation. A national registration, taken under curfew on 8 November, will build the voters'' roll. {prime_minister} must decide whether the vote goes ahead on 25 January.'+text: 'The Provisional State Council has set the Constituent Assembly at 120 seats, elected nationwide by proportional representation, and a national registration taken under curfew on 8 November built the voters'' roll. Postponed because of the war, the vote is set for 25 January.'anchor: hardoffice: prime_minister-# 5 November 1948: the Provisional State Council set the assembly at 120 seats with nationwide PR (en.wiki and he.wiki-# election pages). The vote was postponed twice because of the war; the dates of those decisions are a gap. Registration-# date [C]: 8 November 1948 (CBS, population.yaml; en.wiki and he.wiki election pages) vs "8 or 11" (en.wiki "1948 in-# Israel"); it ran under a seven-hour curfew (he.wiki). The registration has no sourced alternative, so it is folded in-# here, not a choice of its own (notes section 10). The vote: 25 January 1949, turnout 86.9% (en.wiki).-# Research notes facts-1948.md sections 10 and 11.-from: 1948-11-05+# The Declaration of Independence required elected institutions by 1 October 1948; the vote was postponed twice because+# of the war (the dates of those decisions are a gap). 5 November 1948: the Provisional State Council set the assembly at+# 120 seats with nationwide PR (en.wiki and he.wiki election pages). Registration date [C]: 8 November 1948 (CBS,+# population.yaml; en.wiki and he.wiki election pages) vs "8 or 11" (en.wiki "1948 in Israel"); it ran under a seven-hour+# curfew (he.wiki). The vote: 25 January 1949, turnout 86.9% (en.wiki). When 25 January was fixed is a gap; the card+# comes on 23 January, by when the date was set. Research notes sections 10 and 11.+# One option (review I3): legislatures.yaml fixes the election and the First Knesset's sitting, so a "postpone" option+# could not change anything. The window opens on 17 January, so the card comes in the week of the vote.+from: 1949-01-17to: 1949-01-26options:- id: hold@@ -19,12 +21,6 @@ options:effects:- { target: morale, delta: 0.03 }- { target: intl_standing, delta: 0.03 }- - id: postpone- # Game assumption: a plausible alternative given the two real postponements, but no one is recorded arguing for it.- # The legislatures in legislatures.yaml are fixed, so postponing does not move the Knesset's first sitting.- text: Postpone the election again until the armistices are signed- effects:- - { target: intl_standing, delta: -0.05 }sources:- { url: "https://en.wikipedia.org/wiki/1949_Israeli_Constituent_Assembly_election", checked: 2026-10-10 }- { url: "https://he.wikipedia.org/wiki/הבחירות_לאספה_המכוננת", checked: 2026-10-10 }diff --git a/content/events/first_truce.yaml b/content/events/first_truce.yamlindex f47049f30..66ad5ec1f 100644--- a/content/events/first_truce.yaml+++ b/content/events/first_truce.yaml@@ -1,14 +1,15 @@id: first_trucetitle: The First Truce-text: 'The Security Council has called for a four-week cease-fire, supervised by the UN mediator, Count Folke Bernadotte. Neither side may bring fighting men or war material into the country during the truce, and the Council has raised Chapter VII if its terms are broken. {prime_minister} must decide whether Israel accepts.'+text: 'The Security Council has called for a four-week cease-fire, supervised by the UN mediator, Count Folke Bernadotte. Neither side may bring fighting men or war material into Palestine or the Arab states, and the Council has warned of Chapter VII action if the terms are broken. {prime_minister} must decide whether Israel accepts.'anchor: hardoffice: prime_minister# Security Council Resolution 50, 29 May 1948. Israel's acceptance went to the UN on 10 June (Eban's letter, S/834), with# reservations on immigration, food for Jerusalem and blockades; the truce took effect on 11 June and lasted 28 days.# End date [C]: 8 July (en.wiki "1948 Arab-Israeli War") vs 9 July (JVL/IDF, he.wiki); both agree Egypt renewed fighting# on 8 July. Research notes facts-1948.md section 1.-# Accepting does not lower the security level: the truce lasted four weeks, and keeping weekly turns puts the Altalena-# and the Ten Days on their own weeks (game design).+# By design, accepting leaves the security level at 5 (full war, weekly turns); do not "fix" it to 4. The truce lasted+# four weeks: at level 4 the turns would be monthly from 5 June, and the Ten Days and the second truce would both reach the+# player on 5 August, after the fact. The Defence screen shows full war during the truce as a result.from: 1948-06-01to: 1948-06-11options:@@ -18,7 +19,7 @@ options:recommended: trueeffects:# The IDF reorganised and trained, and arms arrived from Europe, especially Czechoslovakia (JVL/IDF).- - { target: security, delta: 0.04 }+ - { target: security, delta: 0.02 }- { target: intl_standing, delta: 0.03 }- id: refuse# Game assumption: the notes found no Israeli voice for refusing. The morale cost (an army short of arms, under thediff --git a/content/events/idf_founding.yaml b/content/events/idf_founding.yamlindex 2a923512a..2f9a2e57b 100644--- a/content/events/idf_founding.yaml+++ b/content/events/idf_founding.yaml@@ -1,6 +1,6 @@id: idf_foundingtitle: One Army-text: 'The Haganah is becoming the Israel Defense Forces, while the Irgun and Lehi still keep their own units. {defense_minister} proposes an order that forbids any armed force other than the IDF.'+text: 'Armed forces are being brought into the new Israel Defense Forces, while the Irgun and Lehi still keep their own units. {defense_minister} proposes an order that forbids any armed force other than the IDF.'anchor: hardtags: [security]office: defense_minister@@ -8,20 +8,24 @@ office: defense_minister# here; JVL says it was issued on 28 May 1948. Both agree it was published in Official Gazette No. 3 of 31 May 1948, so the# window ends then. The Irgun agreed with the government on 1 June 1948 to dissolve into the IDF, Jerusalem excepted# (en.wiki "1948 in Israel" [S]; JVL). Research notes facts-1948.md section 3a.-from: 1948-05-26+# The window opens on 22 May, the turn date before the order (game timing), so the card reaches the player in the turn+# that covers 26 May.+from: 1948-05-22to: 1948-06-01+# Security deltas in these war-period events were halved in fix round 1 (review I6): ten of them stacked as permanent+# shifts, which moved end-1948 security from 0.34 to 0.62 with nothing anchoring it.options:- id: one_armytext: Issue the order and bring every armed force into the IDFhistorical: truerecommended: trueeffects:- - { target: security, delta: 0.03 }+ - { target: security, delta: 0.015 }- id: separate_units# Game assumption: the notes name no one who argued for this; it is the status quo the order ended.text: Leave the Irgun and Lehi units outside the IDF for noweffects:- - { target: security, delta: -0.03 }+ - { target: security, delta: -0.015 }sources:- { url: "https://archives.mod.gov.il/sites/English/Exhibitions/David_Ben_Gurion_and_the_IDF/Pages/The-establishment-of-the-IDF.aspx", checked: 2026-10-10 }- { url: "https://jewishvirtuallibrary.org/the-founding-of-the-israel-defense-forces", checked: 2026-10-10 }diff --git a/content/events/jerusalem_ceasefire.yaml b/content/events/jerusalem_ceasefire.yamlnew file mode 100644index 000000000..945c9606e--- /dev/null+++ b/content/events/jerusalem_ceasefire.yaml@@ -0,0 +1,31 @@+id: jerusalem_ceasefire+title: Cease-fire in Jerusalem+text: 'In talks that began on 28 November, Dayan and Abdullah el-Tell have agreed a full cease-fire for the Jerusalem area, to be signed at Government House with UN observers present. {prime_minister} must decide whether Israel signs.'+anchor: hard+tags: [security]+office: prime_minister+# Signed on 30 November 1948 at Government House, UN observers present (FRUS 1948 v.V pt 2, editorial note d800 [V]);+# talks began on 28 November (UN press release [S]). On 23 December el-Tell apparently received new orders and avoided+# further talks (FRUS d844 [S]). Partial releases of prisoners followed [S]. Research notes facts-1948.md section 13b.+# Only a player who put Jerusalem under military government sees this card (with a demilitarised city there would be no+# IDF commander to sign).+from: 1948-11-28+to: 1948-12-01+requires: { event: jerusalem_military_government, option: military_government }+options:+ - id: sign+ text: Sign the Jerusalem cease-fire+ historical: true+ recommended: true+ effects:+ - { target: security, delta: 0.015 }+ - id: hold_out+ # The alternative named in the notes (section 13b). Game assumption: no one is recorded arguing for it; its effects are+ # design values.+ text: Hold out for the Old City and the Latrun road+ effects:+ - { target: security, delta: -0.015 }+ - { target: intl_standing, delta: -0.03 }+sources:+ - { url: "https://history.state.gov/historicaldocuments/frus1948v05p2/d800", checked: 2026-10-10 }+status: fact-checkeddiff --git a/content/events/jerusalem_military_government.yaml b/content/events/jerusalem_military_government.yamlindex 6cce575b7..b8eacf3cf 100644--- a/content/events/jerusalem_military_government.yaml+++ b/content/events/jerusalem_military_government.yaml@@ -1,29 +1,33 @@id: jerusalem_military_governmenttitle: Jerusalem-text: 'Count Bernadotte has suggested demilitarising Jerusalem. The alternative is to declare the part of Jerusalem held by the IDF Israel-occupied territory, under a military governor, Dov Yosef. {prime_minister} must decide.'+text: 'Count Bernadotte''s proposals would put Jerusalem under UN authority, and he has suggested demilitarising the city. The alternative is to put the part of Jerusalem held by the IDF under Israeli military government, with Dov Yosef as military governor. {prime_minister} must decide.'anchor: hardtags: [security]office: prime_minister-# 2 August 1948: the government rejected Bernadotte's suggestion, declared the Jerusalem area under its control-# Israel-occupied territory and appointed Dov Yosef Military Governor (Official Gazette No. 12; JVL, en.wiki "Dov Yosef").-# Research notes facts-1948.md section 5 (companion events) and 13b.-from: 1948-08-02+# Bernadotte's proposals of 28 June 1948 put Jerusalem under UN authority (notes section 1, JVL/IDF). On 2 August 1948 the+# government rejected his suggestion to demilitarise Jerusalem, declared the Jerusalem area under its control+# Israel-occupied territory (the proclamation's own words) and appointed Dov Yosef Military Governor (Official Gazette+# No. 12; JVL, en.wiki "Dov Yosef"). The date of the demilitarisation suggestion is a gap in the notes. Research notes+# sections 5 (companion events) and 13b. The window opens on 17 July, the turn date before 2 August on the monthly grid of+# the second truce (game timing).+from: 1948-07-17to: 1948-08-03+# Effects of both options are game assumptions: the notes give none for this event.options:- id: military_governmenttext: Declare military government and appoint Dov Yosef governorhistorical: truerecommended: true- # Effects are game assumptions: the notes give none for this event.effects:- - { target: security, delta: 0.02 }+ - { target: security, delta: 0.01 }- { target: intl_standing, delta: -0.02 }- id: accept_demilitarisationtext: Accept the demilitarisation of Jerusalemeffects:- - { target: security, delta: -0.03 }+ - { target: security, delta: -0.015 }- { target: intl_standing, delta: 0.02 }sources:- { url: "https://www.jewishvirtuallibrary.org/jerusalem-declared-israel-occupied-city-government-proclamation", checked: 2026-10-10 }- { url: "https://en.wikipedia.org/wiki/Dov_Yosef", checked: 2026-10-10 }+ - { url: "https://www.jewishvirtuallibrary.org/the-first-truce-1948", checked: 2026-10-10 }status: fact-checkeddiff --git a/content/events/latrun_proposal.yaml b/content/events/latrun_proposal.yamlindex 7eec6b351..a346651af 100644--- a/content/events/latrun_proposal.yaml+++ b/content/events/latrun_proposal.yaml@@ -1,16 +1,20 @@id: latrun_proposaltitle: Latrun-text: '{prime_minister} proposes to the cabinet that the IDF attack and take Latrun, where the July attacks failed. Most ministers, among them Kaplan, Rosen and Shapira, oppose it.'+text: '{prime_minister} proposes to the cabinet that the IDF break the truce to attack and take Latrun. Most ministers, among them {finance_minister}, {justice_minister} and {immigration_minister}, oppose it.'anchor: hardtags: [security]office: prime_minister# Ben-Gurion's diary, 26 September 1948 (Ben-Gurion Archive, primary): the cabinet rejected the proposal. Vote [C]: 7-5 in# the diary (against: Rosen, Moshe Shapira, Levin, Bernstein, Kaplan, Remez and "Sharett (Sheetrit?)"; for: Maimon,# Gruenbaum, Zisling, Bentov and Ben-Gurion) vs "by a majority of one" (Lior Lavid, BGU, citing Bar-Zohar). The diary,-# a primary source, is used; the text names only ministers on its list without a question mark. On 29 September he told-# the General Staff an attack was possible but not at this time [S]. Research notes facts-1948.md section 13a.-from: 1948-09-24+# a primary source, is used. The text names offices whose 1948 holders are on the diary's list without a question mark:+# Finance (Kaplan), Justice (Rosen) and Immigration (Shapira); with player appointments it names the appointees.+# On 29 September he told the General Staff an attack was possible but not at this time [S]. Research notes section 13a.+# The window opens on 17 September, the turn date before the vote on the monthly grid of the second truce (game timing).+# Only a player who complied with the second truce sees this card (it is about breaking the truce).+from: 1948-09-17to: 1948-09-27+requires: { event: second_truce, option: comply }options:- id: accept_votetext: Accept the cabinet's vote and keep the truce@@ -24,7 +28,7 @@ options:text: Press the attack on Latrun despite the voteset_rung: 5effects:- - { target: security, delta: 0.05 }+ - { target: security, delta: 0.025 }- { target: intl_standing, delta: -0.10 }- { target: morale, delta: -0.02 }sources:diff --git a/content/events/operation_hiram.yaml b/content/events/operation_hiram.yamlindex 6df23e3e8..19f2c9488 100644--- a/content/events/operation_hiram.yaml+++ b/content/events/operation_hiram.yaml@@ -18,18 +18,18 @@ options:recommended: trueset_rung: 5effects:- - { target: security, delta: 0.04 }+ - { target: security, delta: 0.02 }- id: advance_into_lebanontext: Launch it, and advance further into Lebanonset_rung: 5effects:- - { target: security, delta: 0.05 }+ - { target: security, delta: 0.025 }- { target: intl_standing, delta: -0.08 }- id: protest_to_un# Game assumption: the notes name no advocate for this option.text: Protest to the UN and hold the lineeffects:- - { target: security, delta: -0.04 }+ - { target: security, delta: -0.02 }sources:- { url: "https://en.wikipedia.org/wiki/Operation_Hiram", checked: 2026-10-10 }status: fact-checkeddiff --git a/content/events/operation_horev.yaml b/content/events/operation_horev.yamlindex ebf642148..0e04d6918 100644--- a/content/events/operation_horev.yaml+++ b/content/events/operation_horev.yaml@@ -7,7 +7,8 @@ office: defense_minister# Start [C]: 22 December 1948 (en.wiki "Operation Horev"; JVL [S]), used here, vs 27 December (en.wiki "1948 in Israel",# the date of the attack on al-Auja). Ended 7 January 1949. Commander Yigal Allon, five brigades. Research notes# facts-1948.md section 9.-from: 1948-12-20+# The window opens on 19 December, the turn date before the launch (game timing).+from: 1948-12-19to: 1948-12-23options:- id: launch@@ -16,12 +17,12 @@ options:recommended: trueset_rung: 5effects:- - { target: security, delta: 0.04 }+ - { target: security, delta: 0.02 }- id: hold# Game assumption: the notes give no alternative to launching; this one names no advocate.text: Hold the lines and wait for talks with Egypteffects:- - { target: security, delta: -0.02 }+ - { target: security, delta: -0.01 }sources:- { url: "https://en.wikipedia.org/wiki/Operation_Horev", checked: 2026-10-10 }- { url: "https://www.jewishvirtuallibrary.org/jsource/History/horev.html", checked: 2026-10-10 }diff --git a/content/events/operation_yoav.yaml b/content/events/operation_yoav.yamlindex cb446ebe9..3b9390097 100644--- a/content/events/operation_yoav.yaml+++ b/content/events/operation_yoav.yaml@@ -1,35 +1,31 @@id: operation_yoavtitle: Operation Yoav-text: 'Supply convoys to the Negev must pass the Egyptian positions. {defense_minister} asks the cabinet to approve an offensive in the south under Yigal Allon, commander of the Southern Front.'+text: 'An Israeli supply convoy was fired on as it passed the Egyptian positions on 14 October, and the offensive the cabinet approved on 6 October is under way under Yigal Allon. {defense_minister} must decide how far it goes.'anchor: hardtags: [security, war-casualties]office: defense_minister# Approved at the cabinet session of 6 October 1948; launched after a supply convoy was fired on as it passed Egyptian# positions on 14 October; 15-22 October 1948; Beersheba taken by the Negev Brigade on 21 October; cease-fire 22 October# (en.wiki "Operation Yoav", "1948 Arab-Israeli War"). At the end Allon asked to push into the Hebron hills and the Jericho-# valley; Ben-Gurion refused, mainly fearing British involvement (en.wiki "Operation Yoav"). That request came at the end of-# the operation; it is offered here as the third option. Research notes facts-1948.md section 7.-from: 1948-10-06-to: 1948-10-16+# valley; Ben-Gurion refused, mainly fearing British involvement (en.wiki "Operation Yoav"). This card is that decision+# (yoav_hebron in notes section 7). The window is the operation, 15-22 October; on the monthly grid of the second truce+# the card comes on 17 October, and the turn it opens covers Allon's request.+from: 1948-10-15+to: 1948-10-23options:- - id: launch- text: Approve the offensive in the south+ - id: stop_at_ceasefire+ text: Stop at the cease-fire and stay out of the Hebron hillshistorical: truerecommended: trueset_rung: 5effects:- - { target: security, delta: 0.05 }+ - { target: security, delta: 0.025 }- id: push_to_hebron- text: Approve it, and let Allon push on into the Hebron hills+ text: Let Allon push on into the Hebron hills and the Jericho valleyset_rung: 5effects:- - { target: security, delta: 0.06 }+ - { target: security, delta: 0.03 }- { target: intl_standing, delta: -0.08 }- - id: wait- # Game assumption: the notes name no advocate for waiting; the cost (the Negev convoys stay blocked) is a design effect.- text: Keep the truce and supply the Negev as before- effects:- - { target: security, delta: -0.03 }sources:- { url: "https://en.wikipedia.org/wiki/Operation_Yoav", checked: 2026-10-10 }- { url: "https://en.wikipedia.org/wiki/1948_Arab–Israeli_War", checked: 2026-10-10 }diff --git a/content/events/rhodes_talks.yaml b/content/events/rhodes_talks.yamlnew file mode 100644index 000000000..0392d8137--- /dev/null+++ b/content/events/rhodes_talks.yaml@@ -0,0 +1,29 @@+id: rhodes_talks+title: Talks at Rhodes+text: 'Egypt announced on 6 January that it will negotiate, and Israel accepted the cease-fire on 7 January. The talks are to open at Rhodes. {foreign_minister} must decide whether Israel sends a delegation.'+anchor: hard+tags: [security]+office: foreign_minister+# Egypt announced on 6 January 1949 that it would negotiate; Israel accepted the cease-fire on 7 January (en.wiki+# "Operation Horev"); the Rhodes talks opened on 13 January 1949 (he.wiki elections page). The RAF clash of 7 January [C]+# (6 January on en.wiki "Operation Horev") is left out of the text. Research notes facts-1948.md section 9 (aftermath).+# Only a player who launched Operation Horev sees this card (the cease-fire it names ends that operation).+from: 1949-01-09+to: 1949-01-13+requires: { event: operation_horev, option: launch }+options:+ - id: send_delegation+ text: Send a delegation to Rhodes+ historical: true+ recommended: true+ effects:+ - { target: intl_standing, delta: 0.03 }+ - id: decline+ # Game assumption: no one is recorded arguing for this; its effect is a design value.+ text: Decline talks for now and keep the pressure on Egypt+ effects:+ - { target: intl_standing, delta: -0.05 }+sources:+ - { url: "https://en.wikipedia.org/wiki/Operation_Horev", checked: 2026-10-10 }+ - { url: "https://he.wikipedia.org/wiki/הבחירות_לאספה_המכוננת", checked: 2026-10-10 }+status: fact-checkeddiff --git a/content/events/second_truce.yaml b/content/events/second_truce.yamlindex 72116b42e..3c11dbeea 100644--- a/content/events/second_truce.yaml+++ b/content/events/second_truce.yaml@@ -1,11 +1,12 @@id: second_trucetitle: The Second Truce-text: 'The Security Council has found a threat to the peace under Article 39 of the Charter and ordered a cease-fire within three days, and an immediate cease-fire in Jerusalem. The attacks on Latrun have failed. {prime_minister} must decide whether Israel complies.'+text: 'The Security Council has found a threat to the peace under Article 39 of the Charter and ordered a cease-fire within three days, and an immediate cease-fire in Jerusalem. {prime_minister} must decide whether Israel complies.'anchor: hardoffice: prime_minister# Security Council Resolution 54, 15 July 1948 (S/902), 7-1 with 3 abstentions. The truce took effect at 19:00 on 18 July# and lasted until 15 October (en.wiki "1948 Arab-Israeli War"; he.wiki gives 18.7-15.10). The date of Israel's acceptance-# is a gap in the notes. Research notes facts-1948.md section 5.+# is a gap in the notes. Research notes facts-1948.md section 5. The text does not mention Latrun: a player who chose the+# southern front never attacked it.from: 1948-07-15to: 1948-07-19options:@@ -19,10 +20,10 @@ options:- { target: intl_standing, delta: 0.03 }- id: defy# Game assumption: the notes name no advocate for defying the resolution.- text: Defy the order and keep attacking Latrun+ text: Defy the order and keep fightingeffects:- { target: intl_standing, delta: -0.10 }- - { target: security, delta: 0.02 }+ - { target: security, delta: 0.01 }sources:- { url: "https://en.wikipedia.org/wiki/United_Nations_Security_Council_Resolution_54", checked: 2026-10-10 }- { url: "https://en.wikipedia.org/wiki/1948_Arab–Israeli_War", checked: 2026-10-10 }diff --git a/content/events/sinai_withdrawal.yaml b/content/events/sinai_withdrawal.yamlindex 3aa782cc6..b8ad8ea44 100644--- a/content/events/sinai_withdrawal.yaml+++ b/content/events/sinai_withdrawal.yaml@@ -12,8 +12,12 @@ office: prime_minister# (JVL, en.wiki "1949 in Israel" and "1948 Arab-Israeli War") vs 6 January (en.wiki "Operation Horev"); Israel accepted the# cease-fire on 7 January. The alternative (holding El-Arish to cut off the Egyptian army) is in Avnery's commentary [S].# Research notes facts-1948.md section 9.+# The card comes on 2 January, a day after Ben-Gurion told McDonald the orders were given (1 January): it cannot come on+# the 26 December turn without stating the facts of 28-30 December in advance (review M6, accepted). Only a player who+# launched Operation Horev sees it.from: 1948-12-31to: 1949-01-03+requires: { event: operation_horev, option: launch }options:- id: withdrawtext: Withdraw from Sinai to the Negev frontier@@ -21,12 +25,12 @@ options:recommended: trueeffects:- { target: intl_standing, delta: 0.05 }- - { target: security, delta: -0.02 }+ - { target: security, delta: -0.01 }- id: hold_el_arishtext: Hold the positions around El-Arisheffects:- - { target: intl_standing, delta: -0.12 }- - { target: security, delta: 0.05 }+ - { target: intl_standing, delta: -0.10 }+ - { target: security, delta: 0.025 }sources:- { url: "https://history.state.gov/historicaldocuments/frus1949v06/d341", checked: 2026-10-10 }- { url: "https://history.state.gov/historicaldocuments/frus1949v06/d371", checked: 2026-10-10 }diff --git a/content/events/ten_days.yaml b/content/events/ten_days.yamlindex 73007d6f2..1edc325e4 100644--- a/content/events/ten_days.yaml+++ b/content/events/ten_days.yaml@@ -1,15 +1,18 @@id: ten_daystitle: The Ten Days-text: 'The first truce is ending and Egypt has renewed the fighting. The General Staff asks where the main effort should go. In the centre, Operation Dani under Yigal Allon would take Lydda airport and secure the road to Jerusalem. {defense_minister} must decide.'+text: 'The first truce is due to end on 9 July. Where should the main effort go when the fighting resumes? In the centre, Operation Dani under Yigal Allon would take Lydda airport and secure the road to Jerusalem. {defense_minister} must decide.'anchor: hardtags: [security, war-casualties]office: defense_minister-# Start [C]: 8 July (en.wiki "1948 Arab-Israeli War", "8-18 July") vs 9 July (en.wiki "Operation Danny", he.wiki); the-# window covers both. Operation Dani ran 9-19 July 1948 under Yigal Allon, Yitzhak Rabin his deputy; Lydda airport was-# taken on 10 July; the attacks on Latrun on 15-16 and 18 July failed. Owner ruling: the text describes the military-# operation only. Research notes facts-1948.md section 4.-from: 1948-07-08+# The truce was due to expire on 9 July; Egypt renewed fighting on 8 July, one day early (en.wiki "1948 Arab-Israeli War";+# JVL/IDF). Start [C]: 8 July (en.wiki, "8-18 July") vs 9 July (en.wiki "Operation Danny", he.wiki). Operation Dani ran+# 9-19 July 1948 under Yigal Allon, Yitzhak Rabin his deputy; Lydda airport was taken on 10 July; the attacks on Latrun on+# 15-16 and 18 July failed. Owner ruling: the text describes the military operation only. Research notes section 4.+# The window opens on 3 July, the turn date before the truce ends (game timing). Only a player who accepted the first+# truce sees this card (its text is about the truce ending).+from: 1948-07-03to: 1948-07-11+requires: { event: first_truce, option: accept }options:- id: central_fronttext: Strike in the centre with Operation Dani, toward Lydda airport and the Jerusalem road@@ -17,14 +20,14 @@ options:recommended: trueset_rung: 5effects:- - { target: security, delta: 0.05 }+ - { target: security, delta: 0.025 }- id: southern_front# Game assumption: a design alternative. The notes found no cabinet debate in July; Ben-Gurion's diary of 11 July# records Yadin asking where forces should go next [S].text: Strike against Egypt in the south firstset_rung: 5effects:- - { target: security, delta: 0.03 }+ - { target: security, delta: 0.015 }sources:- { url: "https://en.wikipedia.org/wiki/Operation_Danny", checked: 2026-10-10 }- { url: "https://en.wikipedia.org/wiki/1948_Arab–Israeli_War", checked: 2026-10-10 }diff --git a/content/rules.yaml b/content/rules.yamlindex 5abff5792..674695306 100644--- a/content/rules.yaml+++ b/content/rules.yaml@@ -42,9 +42,11 @@ imports_per_capita_per_year: 0.00025# knife-edged (valid range about 0.12 wide) because the model left out the documented drain of Q4 1951: about $45m of# short-term credit matured Oct-Dec 1951 (FRUS d513), now applied by both options of forex_crisis_1951. With that drain the# anchor (reserves not exhausted before the turn covering 19 Oct 1951; at its end below $45m; exhausted by the turn that-# covers the end of 1951) holds for 193.78 to 206.62 (measured by bisection); 200 is the centre. Margins at 200: reserves-# $18.9m at the turn after May 1951 and $21.6m at the turn covering 19 Oct (against $45m falling due); first crisis in the-# turn ending 1952-02-26 (the one covering 31 Dec 1951); reserves -36.1 at the end of the run.+# covers the end of 1951) held for 193.78 to 206.62 (measured by bisection); 200 is the centre. Re-measured after the 1948+# war-period events (playtest 1 E, which moved the turn grid by a day): the range is 194.00 to 206.83 (bisection), and the+# margins at 200 are reserves $18.2m at the turn ending 1951-05-27 and $20.9m at the turn covering 19 Oct (against $45m+# falling due); first crisis in the turn ending 1952-02-27 (the one covering 31 Dec 1951); reserves -36.8 at the end of+# the run. The value was not retuned.capital_inflow_per_year: 200# While reserves are exhausted, food imports are cut: food_supply falls by this much per year.fx_crisis_food_per_year: -0.2diff --git a/docs/determinism.md b/docs/determinism.mdindex 5b89a5db8..0f084f4cf 100644--- a/docs/determinism.md+++ b/docs/determinism.md@@ -22,8 +22,8 @@ with `GoldenRun.Seed = 1948` on the real `content/`, then steps with `Historical| Run | Ends | Hash ||---|---|---|-| to 1950-01-01 (`Hash1950`) | 1950-02-27, turn 35 | `d463d5b22c9f98cf6b604a2f31738f01ca4b72cd3b2fb3c58a6d31790f4ff26e` |-| to 1952-01-01 (`Hash1952`) | 1952-02-27, turn 43 | `f78fc68d91fce73bc12e31c3a6eade4e889fd7e6d3002c5b9821075e31ab1dfb` |+| to 1950-01-01 (`Hash1950`) | 1950-02-27, turn 35 | `71e9904d0ee48083db9bbba281f3f046136482ba83ee056e48d57b62e76a5b07` |+| to 1952-01-01 (`Hash1952`) | 1952-02-27, turn 43 | `73590e324f19e9959a455a4da79e93d7089dfcf283c13aac02af6b0a624b9767` |Each constant is written in three places that must agree:- `sim/Statecraft.Sim/GoldenRun.cs`, which Unity code and players compare against;@@ -72,3 +72,5 @@ rules or content, treat it as a determinism bug.| playtest 1 E | 1952 | `16c16d7e` | same; ends 1952-02-27 after 43 turns (was 1952-02-26, turn 53) || playtest 1 E fix 1 | 1950 | `d463d5b2` | events gain `requires: {event, option}`; the hash text gains chosen{event=option;...} (the options each resolved event was resolved with); no change in the run || playtest 1 E fix 1 | 1952 | `f78fc68d` | same |+| playtest 1 E fix 1 | 1950 | `71e9904d` | 1948 war-period events revised after review: windows open on the turn before each decision, Yoav becomes the Hebron-hills decision, follow-ups use `requires`, Bernadotte's shared standing hit, security deltas halved, the elections a one-option card in January, two events added (Jerusalem cease-fire, Rhodes talks); still ends 1950-02-27, turn 35 |+| playtest 1 E fix 1 | 1952 | `73590e32` | same; still ends 1952-02-27, turn 43 |diff --git a/sim/Statecraft.Sim.Tests/DeterminismTests.cs b/sim/Statecraft.Sim.Tests/DeterminismTests.csindex 69e9653db..cbd5417a1 100644--- a/sim/Statecraft.Sim.Tests/DeterminismTests.cs+++ b/sim/Statecraft.Sim.Tests/DeterminismTests.cs@@ -19,7 +19,7 @@ public class DeterminismTests/// <summary>Any change to this value is a deliberate rules or content change: update it here, in/// GoldenRun.Hash1950 and in docs/determinism.md in the same commit.</summary>- public const string GoldenHash = "d463d5b22c9f98cf6b604a2f31738f01ca4b72cd3b2fb3c58a6d31790f4ff26e";+ public const string GoldenHash = "71e9904d0ee48083db9bbba281f3f046136482ba83ee056e48d57b62e76a5b07";/// <summary>Real content, seed 1948, Historical mode, HistoricalAI until the date reaches 1950-01-01.</summary>public static GameState GoldenPlaythrough(Content c) => GoldenRun.Play(c, GoldenRun.Until1950);@@ -34,7 +34,7 @@ public class DeterminismTests}/// <summary>Same rule for the second golden run, which covers the M3 content range (to 1952-01-01).</summary>- public const string GoldenHash1952 = "f78fc68d91fce73bc12e31c3a6eade4e889fd7e6d3002c5b9821075e31ab1dfb";+ public const string GoldenHash1952 = "73590e324f19e9959a455a4da79e93d7089dfcf283c13aac02af6b0a624b9767";[Fact]public void GoldenPlaythroughTo1952HashIsFixed()diff --git a/sim/Statecraft.Sim.Tests/WarEvents1948Tests.cs b/sim/Statecraft.Sim.Tests/WarEvents1948Tests.csindex 5c6ba0ecd..522d72cc0 100644--- a/sim/Statecraft.Sim.Tests/WarEvents1948Tests.cs+++ b/sim/Statecraft.Sim.Tests/WarEvents1948Tests.cs@@ -11,22 +11,50 @@ public class WarEvents1948Testsstatic readonly DateTime Start = new DateTime(1948, 5, 15);static readonly DateTime EgyptArmistice = new DateTime(1949, 2, 24);- /// <summary>Id, the historical option, the security level it sets (null: unchanged) and the responsible office.</summary>- public static readonly (string Id, string Historical, int? Rung, string Office)[] Events =- {- ("idf_founding", "one_army", null, "defense_minister"),- ("first_truce", "accept", null, "prime_minister"),- ("altalena", "enforce", null, "defense_minister"),- ("ten_days", "central_front", 5, "defense_minister"),- ("second_truce", "comply", 4, "prime_minister"),- ("jerusalem_military_government", "military_government", null, "prime_minister"),- ("bernadotte_assassination", "outlaw", null, "prime_minister"),- ("latrun_proposal", "accept_vote", null, "prime_minister"),- ("operation_yoav", "launch", 5, "defense_minister"),- ("operation_hiram", "launch", 5, "defense_minister"),- ("elections_1949", "hold", null, "prime_minister"),- ("operation_horev", "launch", 5, "defense_minister"),- ("sinai_withdrawal", "withdraw", null, "prime_minister"),+ /// <summary>Most consecutive turns of the historical run, before the Egyptian armistice card, that raise no card+ /// (controller ruling, fix round 1, I7).</summary>+ const int MaxEmptyTurns = 4;++ static DateTime D(int y, int m, int d) => new DateTime(y, m, d);++ /// <summary>Id; the historical option; the security level it sets (null: unchanged); the responsible office and its+ /// holder; how many options; and DecidedBy, the date of the historical decision (facts-1948.md), which the card must+ /// reach the player by: the player decides during the turn that starts on the card's date.</summary>+ public static readonly (string Id, string Historical, int? Rung, string Office, string Holder, int Options, DateTime DecidedBy)[] Events =+ {+ ("idf_founding", "one_army", null, "defense_minister", "ben_gurion", 2, D(1948, 5, 26)), // order signed (§3a)+ ("first_truce", "accept", null, "prime_minister", "ben_gurion", 2, D(1948, 6, 10)), // acceptance sent (§1)+ ("altalena", "enforce", null, "defense_minister", "ben_gurion", 2, D(1948, 6, 20)), // force authorised (§2)+ ("ten_days", "central_front", 5, "defense_minister", "ben_gurion", 2, D(1948, 7, 9)), // Dani begins (§4)+ ("second_truce", "comply", 4, "prime_minister", "ben_gurion", 2, D(1948, 7, 18)), // truce in force (§5)+ ("jerusalem_military_government", "military_government", null, "prime_minister", "ben_gurion", 2, D(1948, 8, 2)),+ ("bernadotte_assassination", "outlaw", null, "prime_minister", "ben_gurion", 2, D(1948, 9, 20)), // ultimatum (§6)+ ("latrun_proposal", "accept_vote", null, "prime_minister", "ben_gurion", 2, D(1948, 9, 26)), // cabinet vote (§13a)+ ("operation_yoav", "stop_at_ceasefire", 5, "defense_minister", "ben_gurion", 2, D(1948, 10, 22)), // Hebron refused, cease-fire (§7)+ ("operation_hiram", "launch", 5, "defense_minister", "ben_gurion", 3, D(1948, 10, 28)), // launched night of 28-29 Oct (§8)+ ("jerusalem_ceasefire", "sign", null, "prime_minister", "ben_gurion", 2, D(1948, 11, 30)), // signed (§13b)+ ("operation_horev", "launch", 5, "defense_minister", "ben_gurion", 2, D(1948, 12, 22)), // launched (§9)+ ("sinai_withdrawal", "withdraw", null, "prime_minister", "ben_gurion", 2, D(1949, 1, 1)), // orders given (§9, FRUS d341)+ ("rhodes_talks", "send_delegation", null, "foreign_minister", "sharett", 2, D(1949, 1, 13)), // talks open (§9)+ ("elections_1949", "hold", null, "prime_minister", "ben_gurion", 1, D(1949, 1, 25)), // the vote (§11)+ };++ /// <summary>Cards allowed to reach the player after DecidedBy, and why.</summary>+ static readonly Dictionary<string, string> LateByDesign = new Dictionary<string, string>+ {+ // The facts that make the ultimatum (Sinai crossing 28 Dec, UN call 29 Dec, US message 30 Dec) come after the+ // Horev card's turn, so the card can only come one turn later, a day after the orders (review M6).+ ["sinai_withdrawal"] = "facts of 28-30 Dec cannot be stated on the 26 Dec turn",+ };++ /// <summary>Follow-up events and the earlier choice they depend on (review I2).</summary>+ public static readonly (string Id, string Event, string Option)[] Chains =+ {+ ("ten_days", "first_truce", "accept"),+ ("latrun_proposal", "second_truce", "comply"),+ ("jerusalem_ceasefire", "jerusalem_military_government", "military_government"),+ ("sinai_withdrawal", "operation_horev", "launch"),+ ("rhodes_talks", "operation_horev", "launch"),};public static IEnumerable<object[]> Ids() => Events.Select(e => new object[] { e.Id });@@ -47,11 +75,14 @@ public class WarEvents1948TestsAssert.Equal(row.Office, e.Office);Assert.True(e.To.HasValue, $"{id} needs a closed window");Assert.True(e.From >= Start && e.From < EgyptArmistice, $"{id} opens {e.From:yyyy-MM-dd}, outside the war period");- Assert.True(e.Options.Count >= 2, $"{id} offers no choice");+ Assert.Equal(row.Options, e.Options.Count);var historical = Assert.Single(e.Options, o => o.Historical);Assert.Equal(row.Historical, historical.Id);Assert.True(historical.Recommended);Assert.Equal(row.Historical, e.Options[0].Id); // the smoke run and the event card press the first option+ var chain = Chains.Where(x => x.Id == id).ToList();+ if (chain.Count == 0) Assert.Null(e.Requires);+ else { Assert.Equal(chain[0].Event, e.Requires!.Event); Assert.Equal(chain[0].Option, e.Requires.Option); }}[Theory]@@ -59,14 +90,30 @@ public class WarEvents1948Testspublic void PlaceholdersResolveOnEveryDayOfTheWindow(string id){var e = Get(id);+ var row = Events.Single(x => x.Id == id);for (var d = e.From; d < e.To!.Value; d = d.AddDays(1)){- Offices.Fill(C, e.Title, d);+ Assert.DoesNotContain("{", Offices.Fill(C, e.Title, d));Assert.DoesNotContain("{", Offices.Fill(C, e.Text, d));- foreach (var o in e.Options) Offices.Fill(C, o.Text, d);+ foreach (var o in e.Options) Assert.DoesNotContain("{", Offices.Fill(C, o.Text, d));+ }+ Assert.Equal(row.Holder, Offices.Holder(C, e.Office, e.From)!.Id);+ Assert.Equal(row.Holder, Offices.Holder(C, e.Office, LastDay(e))!.Id);+ }++ /// <summary>Spec section 5.3: office holders are named only through {office} placeholders (review I4).</summary>+ [Theory]+ [MemberData(nameof(Ids))]+ public void NoOfficeHolderIsNamedInTheText(string id)+ {+ var e = Get(id);+ var texts = new[] { e.Title, e.Text }.Concat(e.Options.Select(o => o.Text)).ToList();+ var holders = C.People.Where(p => p.Offices.Any(t => t.From < e.To!.Value && (t.To == null || t.To > e.From))).ToList();+ foreach (var p in holders)+ {+ var surname = p.Name.Split(' ').Last();+ Assert.All(texts, t => Assert.DoesNotContain(surname, t));}- Assert.Equal("ben_gurion", Offices.Holder(C, e.Office, e.From)!.Id); // PM and Defence Minister in 1948-49- Assert.Equal("ben_gurion", Offices.Holder(C, e.Office, LastDay(e))!.Id);}[Theory]@@ -91,47 +138,72 @@ public class WarEvents1948Tests}}- /// <summary>Plays the historical run and records, for each event, the turn it fired on ([turn start, turn end]) and- /// whether HistoricalAI's choice of the historical option was carried out (not refused, then delegated).</summary>- static readonly Dictionary<string, (DateTime TurnStart, DateTime TurnEnd, bool Chosen, int RungAfter)> Run = PlayHistorical();+ sealed class Turn+ {+ public DateTime Start, End;+ public List<string> Raised = new List<string>();+ public List<Rejection> Rejected = new List<Rejection>();+ public int RungAfter;+ }- static Dictionary<string, (DateTime, DateTime, bool, int)> PlayHistorical()+ /// <summary>Plays to March 1949 with HistoricalAI, except that <paramref name="pick"/> may choose another option.</summary>+ static List<Turn> Play(Func<string, string?>? pick = null){- var fired = new Dictionary<string, (DateTime, DateTime)>();- var result = new Dictionary<string, (DateTime, DateTime, bool, int)>();+ var turns = new List<Turn>();var s = Simulation.NewGame(C, GoldenRun.Seed, Mode.Historical);- foreach (var id in s.PendingEvents) fired[id] = (s.Date, s.Date);while (s.Date < new DateTime(1949, 3, 1) && s.GameOver == null){- var commands = HistoricalAI.Commands(C, s);+ var commands = HistoricalAI.Commands(C, s)+ .Select(c => c is ChooseEventOption o && pick?.Invoke(o.EventId) is string other ? new ChooseEventOption(o.EventId, other) : c)+ .ToList();var step = Simulation.Step(C, s, commands);- foreach (var cmd in commands.OfType<ChooseEventOption>())- if (fired.TryGetValue(cmd.EventId, out var when))- result[cmd.EventId] = (when.Item1, when.Item2, !step.Rejected.Any(r => r.Command == cmd), step.State.Rung);- foreach (var id in step.State.FiredEvents.Except(s.FiredEvents)) fired[id] = (s.Date, step.State.Date);+ turns.Add(new Turn+ {+ Start = s.Date, End = step.State.Date, Rejected = step.Rejected.ToList(), RungAfter = step.State.Rung,+ Raised = step.State.FiredEvents.Except(s.FiredEvents).ToList(),+ });s = step.State;}- return result;+ return turns;}+ static readonly List<Turn> Run = Play();++ /// <summary>The date of the card for <paramref name="id"/>: the end of the turn that raised it.</summary>+ static DateTime CardDate(string id) =>+ Run.FirstOrDefault(t => t.Raised.Contains(id))?.End ?? throw new Xunit.Sdk.XunitException($"{id} never fired in the historical run");++ /// <summary>The card reaches the player in a turn that starts by the historical decision (review I1, I7).</summary>[Theory][MemberData(nameof(Ids))]- public void ItFiresInItsWindowAndTheHistoricalChoiceIsMade(string id)+ public void TheCardArrivesBeforeTheHistoricalDecision(string id){+ var row = Events.Single(x => x.Id == id);+ var card = CardDate(id);var e = Get(id);- Assert.True(Run.TryGetValue(id, out var r), $"{id} never fired (or was never answered) in the historical run");- // The turn [TurnStart, TurnEnd] overlaps the window [From, To): the sim's own firing rule, late fire included.- Assert.True(e.From <= r.TurnEnd && r.TurnStart < e.To!.Value,- $"{id} fired on the turn {r.TurnStart:yyyy-MM-dd} to {r.TurnEnd:yyyy-MM-dd}, outside its window {e.From:yyyy-MM-dd} to {e.To:yyyy-MM-dd}");- Assert.True(r.Chosen, $"{id}: HistoricalAI's choice was refused (attention?) and the event was delegated");+ Assert.True(card >= e.From && card < e.To!.Value.AddDays(31), $"{id}: card {card:yyyy-MM-dd} far from its window");+ if (LateByDesign.TryGetValue(id, out var why))+ Assert.True(card <= row.DecidedBy.AddDays(1), $"{id}: card {card:yyyy-MM-dd}, more than a day after {row.DecidedBy:yyyy-MM-dd} ({why})");+ else+ Assert.True(card <= row.DecidedBy, $"{id}: card {card:yyyy-MM-dd}, after the historical decision of {row.DecidedBy:yyyy-MM-dd}");+ }++ /// <summary>Every card is answered by HistoricalAI on the turn it appears, and nothing is refused for attention+ /// (fix round 1: attention at or under the cap on every turn).</summary>+ [Fact]+ public void NoTurnBeforeTheArmisticeRefusesAnOrder()+ {+ foreach (var t in Run)+ Assert.True(t.Rejected.Count == 0, $"turn {t.Start:yyyy-MM-dd}: refused {string.Join("; ", t.Rejected.Select(r => r.Reason))}");}[Fact]public void TheHistoricalRunMovesThroughTheTruces(){- Assert.Equal(4, Run["second_truce"].RungAfter); // the second truce: monthly turns- Assert.Equal(5, Run["operation_yoav"].RungAfter); // Yoav ends it- Assert.Equal(5, Run["sinai_withdrawal"].RungAfter); // full war until the armistice with Egypt+ int After(string id) => Run.Single(t => t.Start == CardDate(id)).RungAfter;+ Assert.Equal(4, After("second_truce")); // the second truce: monthly turns+ Assert.Equal(5, After("operation_yoav")); // Yoav ends it+ Assert.Equal(5, After("sinai_withdrawal")); // full war until the armistice with Egypt}/// <summary>Two events whose historical options set different security levels must never be answered on the same@@ -139,23 +211,43 @@ public class WarEvents1948Tests[Fact]public void NoTurnOfTheHistoricalRunAsksForTwoDifferentSecurityLevels(){- foreach (var turn in Run.Where(kv => Events.Any(x => x.Id == kv.Key)).GroupBy(kv => kv.Value.TurnEnd))+ foreach (var t in Run){- var rungs = turn.Select(kv => Events.Single(x => x.Id == kv.Key).Rung).Where(x => x.HasValue).Distinct().ToList();- Assert.True(rungs.Count <= 1, $"turn ending {turn.Key:yyyy-MM-dd} asks for levels {string.Join(", ", rungs)} ({string.Join(", ", turn.Select(kv => kv.Key))})");+ var rungs = t.Raised.Where(id => Events.Any(x => x.Id == id)).Select(id => Events.Single(x => x.Id == id).Rung)+ .Where(x => x.HasValue).Distinct().ToList();+ Assert.True(rungs.Count <= 1, $"card {t.End:yyyy-MM-dd} asks for levels {string.Join(", ", rungs)}");}}- /// <summary>Playtest 1 E: no stretch of more than eight weeks between 15 May 1948 and the Egyptian armistice- /// (24 February 1949) without an event window opening.</summary>+ /// <summary>Playtest 1 E: counted in turns of the historical run, from the start to the Egyptian armistice card, no+ /// more than MaxEmptyTurns consecutive turns raise no card (review I7, I8).</summary>[Fact]- public void NoEightWeekStretchWithoutAnEventWindow()+ public void NoLongStretchOfTurnsWithoutACard(){- var opens = C.Events.Select(e => e.From).Where(d => d >= Start && d <= EgyptArmistice)- .Concat(new[] { Start, EgyptArmistice }).Distinct().OrderBy(d => d).ToList();- Assert.Contains(EgyptArmistice, C.Events.Select(e => e.From));- for (int i = 1; i < opens.Count; i++)- Assert.True((opens[i] - opens[i - 1]).TotalDays <= 56, $"no event window opens between {opens[i - 1]:yyyy-MM-dd} and {opens[i]:yyyy-MM-dd}");+ var armistice = Run.FindIndex(t => t.Raised.Contains("armistice_egypt"));+ Assert.True(armistice > 0, "the Egyptian armistice never fired");+ int empty = 0;+ var stretches = new List<string>();+ for (int i = 0; i <= armistice; i++)+ {+ if (Run[i].Raised.Count == 0) { empty++; continue; }+ if (empty > MaxEmptyTurns) stretches.Add($"{empty} turns ending {Run[i - 1].End:yyyy-MM-dd}");+ empty = 0;+ }+ Assert.True(stretches.Count == 0, "empty stretches: " + string.Join("; ", stretches));+ }++ /// <summary>A follow-up card never fires when the player chose otherwise earlier (review I2).</summary>+ [Fact]+ public void AFollowUpNeedsTheChoiceItDescribes()+ {+ foreach (var (id, required, option) in Chains)+ {+ var other = Get(required).Options.First(o => o.Id != option).Id;+ var run = Play(e => e == required ? other : null);+ Assert.True(run.Any(t => t.Raised.Contains(required)), $"{required} never fired");+ Assert.False(run.Any(t => t.Raised.Contains(id)), $"{id} fired although {required} was answered '{other}'");+ }}/// <summary>EventRules.SensitiveTags (internal to the sim): the loader refuses a money reward on these.</summary>@@ -170,7 +262,14 @@ public class WarEvents1948TestsAssert.Contains("terror", Get("bernadotte_assassination").Tags);var tags = C.Events.SelectMany(e => e.Tags).Distinct().ToList();Assert.All(tags, t => Assert.True(t == "security" || Sensitive.Contains(t), $"tag '{t}' is neither 'security' nor a sensitive tag the loader enforces"));- foreach (var e in Events.Select(x => Get(x.Id)).Where(e => e.Tags.Any(Sensitive.Contains)))- Assert.All(e.Options.SelectMany(o => o.Effects), f => Assert.False((f.Target == "treasury" || f.Target == "fx_reserves") && f.Delta > 0));+ }++ /// <summary>Notes section 6: the killing costs standing whatever the answer (review I5).</summary>+ [Fact]+ public void BothAnswersToTheAssassinationShareTheStandingHit()+ {+ var e = Get("bernadotte_assassination");+ Assert.All(e.Options, o => Assert.Contains(o.Effects, f => f.Target == "intl_standing" && f.Delta == -0.05));+ Assert.All(e.Options, o => Assert.True(o.Effects.Where(f => f.Target == "intl_standing").Sum(f => f.Delta) < 0, $"{o.Id} raises standing"));}}diff --git a/sim/Statecraft.Sim/GoldenRun.cs b/sim/Statecraft.Sim/GoldenRun.csindex e422f2174..590640963 100644--- a/sim/Statecraft.Sim/GoldenRun.cs+++ b/sim/Statecraft.Sim/GoldenRun.cs@@ -11,12 +11,12 @@ namespace Statecraft.Sim/// <summary>Final hash of Play(content, Until1950). Changing it is a deliberate rules or content change:/// update it, DeterminismTests and docs/determinism.md in the same commit and say why in the message.</summary>- public const string Hash1950 = "d463d5b22c9f98cf6b604a2f31738f01ca4b72cd3b2fb3c58a6d31790f4ff26e";+ public const string Hash1950 = "71e9904d0ee48083db9bbba281f3f046136482ba83ee056e48d57b62e76a5b07";public static readonly DateTime Until1950 = new DateTime(1950, 1, 1);/// <summary>Final hash of Play(content, Until1952): the M3 content range (to 31 December 1951).</summary>- public const string Hash1952 = "f78fc68d91fce73bc12e31c3a6eade4e889fd7e6d3002c5b9821075e31ab1dfb";+ public const string Hash1952 = "73590e324f19e9959a455a4da79e93d7089dfcf283c13aac02af6b0a624b9767";public static readonly DateTime Until1952 = new DateTime(1952, 1, 1);