A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
Borders: close every band along land without colour (owner ruling 27 Oct) (#1851)
Eyal Golan4366ce495905
diff --git a/changelog.d/close-borders-uncoloured.md b/changelog.d/close-borders-uncoloured.mdnew file mode 100644index 000000000..05fadd133--- /dev/null+++ b/changelog.d/close-borders-uncoloured.md@@ -0,0 +1,9 @@+### Fixed++- Region borders no longer stop in mid-air where they meet land the 1948 lines leave without colour. On the south+ coast at the game's start, Shoval's blue hex drew a lone edge against the Hebron hills, and the 9 July front ended+ abruptly at the uncoloured Gaza sub-district. Land without colour now works like the land beyond the frontier: it+ draws no band of its own, and each side's band runs along its edge. Every pinned settlement hex (Negba, Yad+ Mordechai, Nir Am, Shoval and the rest) now gets a closed blue ring, and every front closes, in every period from+ 15 May 1948 to the 1949 armistice lines. Display only: the sim never reads the control layer. Owner's ruling of+ 27 October 2026 ("Close the borders").diff --git a/docs/visual-v1.md b/docs/visual-v1.mdindex 676339ff5..4cfb02e1d 100644--- a/docs/visual-v1.md+++ b/docs/visual-v1.md@@ -1217,8 +1217,11 @@ D-C (owner-verify).whole periods only, so the Yoav period shows Huleiqat's hex Israeli from 15 October, four days before its capture.- *Drawing:* `MapRegions` draws `Control1948`'s layer from 15 May 1948 (#674): Israel Primary, the other side Secondary,contested, no-man's land and zones the new Neutral style (`BorderStyle.Neutral`, the shader's third style, dashed along- its edge every 2 km, 65% drawn: a cue that is not colour), the land beyond the frontier style none, no colour left out (no- band, so the edge of the sourced data is not drawn as a front). Before a first period (none with today's data) the+ its edge every 2 km, 65% drawn: a cue that is not colour), the land beyond the frontier style none, no colour also style+ none (owner ruling of 27 October 2026, "Close the borders"; was left out of the layer, which left one-edge bands such+ as Shoval's in mid-air): it draws no band of its own and each side's band runs one-sided along it, as along the frontier,+ so every pinned settlement hex is ringed and no front ends in mid-air (`ControlTests.NoBorderEndsInMidAirInAnyPeriod`,+ every period). Before a first period (none with today's data) thesub-districts would be drawn in Neutral, since blue means the Israeli side. Colours: Primary pre-grade sRGB 0.29, 0.40, 0.56 (was 0.40, 0.50, 0.80), measured onscreen at deltaE76 0.6 from 89,119,156; Neutral 0.46, 0.46, 0.44 with a pale stripe 0.98, 0.97, 0.93.- *Label* (`map-layer`, `MapRegions.ControlLabel`): the legend names each side before its colour, and grey as dashed:diff --git a/unity/Assets/Editor/MapCapture.cs b/unity/Assets/Editor/MapCapture.csindex 17b2aa289..8c012ed47 100644--- a/unity/Assets/Editor/MapCapture.cs+++ b/unity/Assets/Editor/MapCapture.cs@@ -207,10 +207,16 @@ public static class MapCapturefinally { QualitySettings.SetQualityLevel(saved, true); }}+ /// <summary>The owner's view of 27 October 2026 ("there are incomplete borders like here"): the south coast from Gaza to+ /// Negba, where the uncoloured south meets the 9 July front and Shoval's pinned hex; bands there ended in mid-air until+ /// the owner's "Close the borders" ruling of the same day.</summary>+ public static readonly PromoPose SouthCoast = new PromoPose("southcoast", 34.66, 31.58, 45000f, 0f);+/// <summary>The Civ-like border prototype's evidence (#196): the map as a new game starts (the side-coloured control/// layer of 15 May 1948, as GameRoot.Begin draws it; kits and trees on, the water's clock pinned), on the WebGL tier,- /// at 1920x1080, from three views: gameplay03, a close view (20 km over the Israeli/Arab boundary hex nearest- /// gameplay03) and the overview (diorama02); then the synthetic proof at gameplay03. One set for the variant this run draws+ /// at 1920x1080, from four views: gameplay03, a close view (20 km over the Israeli/Arab boundary hex nearest+ /// gameplay03), the overview (diorama02) and the south coast (<see cref="SouthCoast"/>); then the synthetic proof at+ /// gameplay03. One set for the variant this run draws/// unasked ("Default": A2, or what -bordervariant names), then one per variant (Legacy, main's earlier look, then A-C2) into/// <-captureDir> (default captures/borders) as <variant>-<view>.png.</summary>public static void BorderVariants()@@ -254,7 +260,7 @@ public static class MapCapture}}}- Shoot("", new[] { PromoPose.Gameplay03, closePose, PromoPose.Diorama02 });+ Shoot("", new[] { PromoPose.Gameplay03, closePose, PromoPose.Diorama02, SouthCoast });BorderProof.Show(map);Shoot("proof-", new[] { PromoPose.Gameplay03 });}diff --git a/unity/Assets/Scripts/Map/Control1948.cs b/unity/Assets/Scripts/Map/Control1948.csindex 328b7a0af..377372017 100644--- a/unity/Assets/Scripts/Map/Control1948.cs+++ b/unity/Assets/Scripts/Map/Control1948.cs@@ -67,7 +67,7 @@ namespace Statecraft.Game.Mappublic bool Covers(DateTime d) => d >= From && (Until == null || d < Until.Value);}- public const int IsraelId = 1, ArabId = 2, NeutralId = 3, OutsideId = 4;+ public const int IsraelId = 1, ArabId = 2, NeutralId = 3, OutsideId = 4, NoColourId = 5;static readonly Dictionary<char, (Side side, string? holder)> CodeOf = new Dictionary<char, (Side, string?)>{['I'] = (Side.Israel, null), ['E'] = (Side.Arab, "egypt"), ['J'] = (Side.Arab, "jordan"),@@ -140,8 +140,9 @@ namespace Statecraft.Game.Map}/// <summary>The layer drawn on <paramref name="date"/> (null before the first period), built once per period: Israel- /// primary, the other side secondary, contested, no-man's land and demilitarized zones neutral, no colour left out (no- /// band, and it stops its neighbours' bands: the edge of the sourced data is not a front line).</summary>+ /// primary, the other side secondary, contested, no-man's land and demilitarized zones neutral, no colour a region of+ /// style none (owner ruling of 27 October 2026, "Close the borders"): it draws no band of its own, and each side's band+ /// runs one-sided along it, as along the frontier, so a pinned settlement hex is ringed and no band ends in mid-air.</summary>public RegionLayer? LayerOn(DateTime date){int i = Index(date);@@ -151,11 +152,10 @@ namespace Statecraft.Game.Mapforeach (var kv in codes){var side = CodeOf[kv.Value[i]].side;- int id = side switch { Side.Israel => IsraelId, Side.Arab => ArabId, Side.Contested => NeutralId, Side.NoMansLand => NeutralId, Side.Dmz => NeutralId, _ => 0 };- if (id != 0) hexes[kv.Key] = id;+ hexes[kv.Key] = side switch { Side.Israel => IsraelId, Side.Arab => ArabId, Side.Contested => NeutralId, Side.NoMansLand => NeutralId, Side.Dmz => NeutralId, _ => NoColourId };}foreach (var h in outside) if (!hexes.ContainsKey(h)) hexes[h] = OutsideId;- var styles = new Dictionary<int, BorderStyle> { [IsraelId] = BorderStyle.Primary, [ArabId] = BorderStyle.Secondary, [NeutralId] = BorderStyle.Neutral, [OutsideId] = BorderStyle.None };+ var styles = new Dictionary<int, BorderStyle> { [IsraelId] = BorderStyle.Primary, [ArabId] = BorderStyle.Secondary, [NeutralId] = BorderStyle.Neutral, [OutsideId] = BorderStyle.None, [NoColourId] = BorderStyle.None };return layers[i] = new RegionLayer("control_1948_49:" + Periods[i].Id, hexes, styles);}diff --git a/unity/Assets/Tests/EditMode/ControlTests.cs b/unity/Assets/Tests/EditMode/ControlTests.csindex 178f0f272..1dd33efc6 100644--- a/unity/Assets/Tests/EditMode/ControlTests.cs+++ b/unity/Assets/Tests/EditMode/ControlTests.cs@@ -158,7 +158,7 @@ public class ControlTestsAssert.AreEqual(BorderStyle.Neutral, Style(AcreHex), "the Acre coast: Operation Ben-Ami, Acre taken 17/18 May");Assert.AreEqual(BorderStyle.Neutral, Style(JerusalemHex));Assert.AreEqual(BorderStyle.Primary, Style(YadMordechaiHex), "a settlement in the uncoloured south (owner ruling Q3)");- Assert.AreEqual(0, layer.RegionOf(GazaHex.q, GazaHex.r), "the south has no colour: no region, no band");+ Assert.AreEqual(BorderStyle.None, Style(GazaHex), "the south has no colour: a region of style none, no band of its own (owner ruling of 27 October 2026)");var c = m.Control!;Assert.AreEqual((Control1948.Side.Contested, (string?)null), c.At(AcreHex.q, AcreHex.r, Start));Assert.AreEqual((Control1948.Side.NoMansLand, (string?)null), c.At(JerusalemHex.q, JerusalemHex.r, Start));@@ -192,6 +192,44 @@ public class ControlTestsAssert.AreEqual(0, layer.RegionOf(sea.q, sea.r), "the sea: no band along the coast");}+ /// <summary>Owner ruling of 27 October 2026 ("Close the borders"): no drawn band ends in mid-air in any period. A drawn+ /// edge (two regions, at least one with a style) must, at each of its two ends, run on into another drawn edge, or end+ /// at the coast or the edge of the data (a hex that is not land on the map). It holds for any hex grid: no hex is named,+ /// and a failure lists each offending edge and the hex it ends at. Before the ruling the uncoloured south was in no+ /// region, so Shoval's pinned blue hex drew one lone edge against the Hebron hills, and the 9 July front stopped where+ /// it met the uncoloured Gaza sub-district.</summary>+ [Test]+ public void NoBorderEndsInMidAirInAnyPeriod()+ {+ var m = Regions();+ var land = new HashSet<(int q, int r)>(JsonUtility.FromJson<HexFile>(Inputs.Map.HexesJson).hexes.Where(h => h.land).Select(h => (h.q, h.r)));+ var steps = MapBorders.NeighbourSteps;+ var dangling = new List<string>();+ foreach (var period in m.Control!.Periods)+ {+ var layer = m.LayerOn(period.From)!;+ bool Drawn((int q, int r) a, (int q, int r) b)+ {+ int x = layer.RegionOf(a.q, a.r), y = layer.RegionOf(b.q, b.r);+ return x > 0 && y > 0 && x != y && (layer.StyleOf(x) != BorderStyle.None || layer.StyleOf(y) != BorderStyle.None);+ }+ foreach (var a in layer.Hexes)+ for (int i = 0; i < steps.Length; i++)+ {+ var b = (q: a.q + steps[i].dq, r: a.r + steps[i].dr);+ if (!Drawn(a, b)) continue;+ // The edge's two ends: the hexes a and b both touch, the neighbours of a before and after b.+ foreach (int j in new[] { (i + 5) % 6, (i + 1) % 6 })+ {+ var x = (q: a.q + steps[j].dq, r: a.r + steps[j].dr);+ if (Drawn(a, x) || Drawn(b, x) || !land.Contains(x)) continue;+ dangling.Add($"{period.Id}: edge ({a.q}, {a.r})|({b.q}, {b.r}) ends at land hex ({x.q}, {x.r}) in region {layer.RegionOf(x.q, x.r)}");+ }+ }+ }+ Assert.IsEmpty(dangling, "bands that end in mid-air:\n" + string.Join("\n", dangling));+ }+[Test]public void TheLabelNamesTheSidesBeforeTheirColoursWithADashedGreyInEnglishAndHebrew(){