A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
sim: the Send home unit order after the armistice (refs #1309) (#1342)
agamrafaeli-instinct3d573bbb6ecf
diff --git a/changelog.d/sim-send-home-1309.md b/changelog.d/sim-send-home-1309.mdnew file mode 100644index 000000000..ccf66dbde--- /dev/null+++ b/changelog.d/sim-send-home-1309.md@@ -0,0 +1,3 @@+- Simulation: the "Send home" unit order (R-UNIT-005, refs #1309) - after the armistice on the unit's front, a unit+ leaves the map and its people join the nearest city as civilians without a job. Refused while that armistice is+ unsigned; a unit fighting no front waits for any armistice. No automatic demobilisation.diff --git a/docs/rules/mvp.md b/docs/rules/mvp.mdindex f29bfe86f..ee6e5feea 100644--- a/docs/rules/mvp.md+++ b/docs/rules/mvp.md@@ -160,6 +160,8 @@ R-UNIT-003: A finished recruit cohort becomes exactly one Israeli infantry formaR-UNIT-004: Each Israeli recruit formation already in play before step 4 gains one service turn; a cohort graduating in step 4 starts serving on the next turn. At `veteran_soldier_service` it becomes `veteran_soldier`, keeping id, hex, service, side, strength and standing order, with a Why cause. Veterans stop accumulating service. Combat gives no extra service, and Phase 5 adds no return to civilian life (Q-UNIT-2, Q-UNIT-6; owner, 15 October 2026). The owner-accepted initial threshold is 6 turns, a labelled design value under Q-GEN-1, not a historical period (19 October 2026, https://github.com/eyalgolan/statecraft-israel/pull/1130#issuecomment-6269103829). The loader requires it to be at least 1 and requires the Israeli veteran infantry type when recruits exist.+R-UNIT-005: `UnitOrder(unit, send_home)` (the unit card's "Send home", #1309) is the player's order and the only way home: no automatic demobilisation happens (owner, 22 October 2026, #1309: https://github.com/eyalgolan/statecraft-israel/issues/1309#issuecomment-6334162964). It is refused, the state unchanged, with the orders' own reasons for an unknown unit, a unit with no side or an enemy unit (R-ORDER-001's wording) and "That order names no hex" when a hex is given, and with "The armistice with <front> is not signed" while the armistice on the unit's front is unsigned. A unit's front is the front of the enemy side it attacks (the hex its attack order names) or borders (an adjacent hex); ties take the nearest enemy unit, then the lowest unit id (owner, 22 October 2026, #1309: https://github.com/eyalgolan/statecraft-israel/issues/1309#issuecomment-6340226644). A side that belongs to no front (the ALA and the local forces, Q-OBJ-1; R-POW-004's map) names none (accepted per maintainer comment, 22 October 2026, #1309: https://github.com/eyalgolan/statecraft-israel/issues/1309#issuecomment-6341877062: the ALA and the local forces belong to no front, having no armistice of their own), and a unit attacking and bordering no front-bearing enemy may be sent home once any armistice is signed, refused with "No armistice is signed" until then (accepted per maintainer comment 6341877062 on #1309: "no enemy units in play" means attacking and bordering no enemy that has a front). Taken, the order acts at once: the unit leaves the map and its strength, in population units, joins the nearest of the twelve cities as civilians without a job (owner, 22 October 2026, #1309: https://github.com/eyalgolan/statecraft-israel/issues/1309#issuecomment-6334162964: "nearest ... as unemployed civilians"), counting in the city's jobs and housing from the same turn; nearest by hex distance to the city's settlement hex, ties by the city's id (agent default - the ruling sets no tie break). The Why line states the count in people (Q-CIV-4): "Unit N is sent home: its P people are civilians in <city> now". A veteran keeps nothing (none suggested, #1309).+R-UNIT-006: A new Historical game places one military unit per row of `map/units_1948.yaml` that is not `hidden`, has `service: army` (the squadron and the ships stay presentation-only tokens, Q-UNIT-5), has a `strength` whose `as_of` is the start day, and has an anchor window [from, to) covering the start. The unit stands on the hex that holds the first such anchor's coordinates, by the map's projection and cube rounding (`tools/hexgrid.py`, Unity's `HexPicker`), precomputed by `tools/unit_anchor_hexes.py` into `map/unit_anchor_hexes.yaml`, which the sim reads (no projection maths in the sim, docs/determinism.md); the token may stand one hex away (`UnitPlacer`), which is presentation. Every IDF brigade is a `veteran_soldier`; an Arab force takes its side's one military type, a labelled design value of class infantry with 3 movement points. Its strength is the row's people in population units, the nearest unit with a half up and never below 1 (`people_per_unit` 1,000: Golani's 4,095 is 4, Kiryati's 2,504 is 3). The units take ids 0 upward in the file's order, before any other unit (owner, 20 October 2026, #743: "all five defaults"). The file is in the content hash (Q-START-1), and so is the hex file. The loader refuses a starting row whose anchor is off the map or not on land or has no row in the hex file, a hex row for an anchor the unit file does not have, or whose side has no single military type, naming the file and the row. A shareable build refuses while any row a unit starts from is not `fact-checked` (Q-START-3): `Statecraft.Cli --release-gate`, `Build -shareable` and `tools/package_release.py` name them.R-UNIT-007: Open mode starts no forces (Q-START-2, owner, 15 October 2026); `Simulation.NewGame` refuses Open mode until milestone M4.diff --git a/sim/Statecraft.Sim.Tests/DemobilizationTests.cs b/sim/Statecraft.Sim.Tests/DemobilizationTests.csnew file mode 100644index 000000000..f9580423a--- /dev/null+++ b/sim/Statecraft.Sim.Tests/DemobilizationTests.cs@@ -0,0 +1,171 @@+using System;+using System.Collections.Generic;+using System.Linq;+using Statecraft.Sim;+using Xunit;++/// <summary>R-UNIT-005 (GDD Phase 7, #1309): the player's "Send home" order, allowed after the armistice on the unit's+/// front (owner, 22 October 2026, #1309); the unit leaves the map and its strength joins the nearest city's civilians+/// without a job, counting in its jobs and housing. The front is the front of the enemy side the unit attacks or borders+/// (ties: the nearest enemy unit, then the lowest unit id); a side that belongs to no front names none (Q-OBJ-1), and a+/// unit that attacks and borders no front-bearing enemy may go home once any armistice is signed.</summary>+public class DemobilizationTests+{+ const string Types = Fixture.GddUnitTypes+ + " - { id: soldier, kind: unit, side: israel, class: infantry, movement_points: 3 }\n"+ + " - { id: enemy, kind: unit, side: egypt, class: infantry, movement_points: 3 }\n"+ + " - { id: syrian, kind: unit, side: syria, class: infantry, movement_points: 3 }\n"+ + " - { id: arab, kind: unit, side: ala, class: infantry, movement_points: 3 }\n"+ + " - { id: gun, kind: unit, side: israel, class: artillery, movement_points: 2, range: 2, arms_per_fire: 3, combat_percent: 200 }\n";++ static Content Load(Dictionary<string, string>? extra = null)+ {+ var files = new Dictionary<string, string>+ {+ ["unit_types.yaml"] = Types, ["map/hexes.json"] = MovementTests.Board(), ["corridors.yaml"] = "corridors: []\n",+ };+ if (extra != null) foreach (var kv in extra) files[kv.Key] = kv.Value;+ return ContentLoader.Load(Fixture.Write(Fixture.Gdd(files)));+ }++ /// <summary>Two cities (ArrivalsTests' pattern): town_a on (1, 0), town_b on (2, 1), one civilian each.</summary>+ static readonly Dictionary<string, string> TwoCities = new Dictionary<string, string>+ {+ ["map/settlement_hexes.yaml"] = "settlements:\n - { id: town_a, q: 1, r: 0 }\n - { id: town_b, q: 2, r: 1 }\n",+ ["map/settlements_1948.yaml"] = Fixture.Files["map/settlements_1948.yaml"]+ + " - { id: town_b, name: Town B, lon: 34.42, lat: 33.28, type: town, founded: 1900, pre_modern: false }\n",+ ["map/locations_1948.yaml"] = Fixture.Files["map/locations_1948.yaml"]+ + " - id: town_b\n name: Town B\n name_he: עיר ב\n name_he_sources: [{ url: 'https://example.org/town-b-he', checked: 2026-10-18 }]\n kind: city\n lon: 34.42\n lat: 33.28\n q: 2\n r: 1\n priority: must_have\n marker: true\n managed_city: true\n designated_site: false\n settlement_control_target: false\n sources: [{ url: 'https://example.org/town-b', checked: 2026-10-18 }]\n status: draft\n",+ ["cities.yaml"] = "cities:\n" + Fixture.City("town_a", 40, 1, 1, 0) + Fixture.City("town_b", 40, 1, 1, 0),+ };++ static GameState State(Content c, params Unit[] units)+ {+ var s = Simulation.NewGame(c, 1, Mode.Historical);+ foreach (var u in units) s.Units.Add(u.Id, u);+ s.NextId = units.Length == 0 ? s.NextId : Math.Max(s.NextId, units.Max(u => u.Id) + 1);+ return s;+ }++ static StepResult Step(Content c, GameState s, params Command[] cmds) => Simulation.Step(c, s, cmds);++ static Unit Soldier(int id, int q, int r, string order = "", string target = "", string homeCity = "") =>+ new Unit(id, "soldier", q, r, side: "israel", strength: 5, order: order, orderTarget: target, homeCity: homeCity);++ // R-UNIT-005: before the armistice on the unit's front the order is refused, the state as a turn without the order+ // leaves it; another front's signature does not open it.+ [Fact]+ public void TheFrontsArmisticeMustBeSigned()+ {+ var c = Load();+ var s = State(c, Soldier(1, 3, 0), new Unit(2, "enemy", 2, 0, side: "egypt", strength: 3));+ Assert.Equal("The armistice with Egypt is not signed", Demobilization.Check(c, s, 1));+ var refused = Step(c, s, new UnitOrder(1, Demobilization.SendHome));+ Assert.Equal("The armistice with Egypt is not signed", Assert.Single(refused.Rejected).Reason);+ Assert.Equal(Step(c, s).State.Hash(), refused.State.Hash());+ refused.State.ChosenOptions["armistice_syria"] = "sign"; // another front's signature does not open it+ var again = Step(c, refused.State, new UnitOrder(1, Demobilization.SendHome));+ Assert.Equal("The armistice with Egypt is not signed", Assert.Single(again.Rejected).Reason);+ }++ // R-UNIT-005: the standing refusals are the orders' own (R-ORDER-001's wording).+ [Theory]+ [InlineData(9, "There is no such unit")]+ [InlineData(2, "That unit is not yours")]+ [InlineData(3, "Only a military unit takes that order")]+ public void TheRefusals(int unit, string reason)+ {+ var c = Load();+ var s = State(c, Soldier(1, 3, 0), new Unit(2, "enemy", 2, 0, side: "egypt", strength: 3), new Unit(3, "halutz", 3, 1));+ Assert.Equal(reason, Demobilization.Check(c, s, unit));+ }++ // R-UNIT-005: like fortify and hold, the order names no hex.+ [Fact]+ public void SendHomeNamesNoHex()+ {+ var c = Load();+ var s = State(c, Soldier(1, 3, 0));+ s.ChosenOptions["armistice_egypt"] = "sign";+ Assert.Equal("That order names no hex", Assert.Single(Step(c, s, new UnitOrder(1, Demobilization.SendHome, 2, 0)).Rejected).Reason);+ }++ // R-UNIT-005: after the front's armistice the unit leaves the map and its strength joins the nearest city's+ // civilians, counting in its jobs (R-CITY-009 fills town_b's one slot the same turn) and its housing: the unit's+ // home is town_a, so its people move out of town_a's housing (R-HOUSE-003) and into town_b's, never counted twice+ // or lost. The move is deterministic.+ [Fact]+ public void SentHomeAfterTheArmistice()+ {+ var c = Load(TwoCities);+ GameState Fresh()+ {+ var s = State(c, Soldier(1, 3, 0, homeCity: "town_a"), new Unit(2, "enemy", 2, 0, side: "egypt", strength: 3));+ s.ChosenOptions["armistice_egypt"] = "sign";+ return s;+ }+ var before = Fresh();+ Assert.Equal(6, Cities.Housed(before, before.Cities["town_a"])); // the fixture's 1 civilian plus the unit's 5+ Assert.Equal(1, Cities.Housed(before, before.Cities["town_b"]));+ var done = Step(c, Fresh(), new UnitOrder(1, Demobilization.SendHome));+ Assert.Empty(done.Rejected);+ Assert.DoesNotContain(done.State.Units.Keys, id => id == 1);+ var b = done.State.Cities["town_b"]; // (2, 1) is 1 hex from (3, 0); town_a on (1, 0) is 2+ Assert.Equal(6, b.Civilians); // the fixture's 1 plus the unit's 5+ Assert.Equal(1, b.Employed); // the one job slot fills in the same turn+ Assert.Equal(1, done.State.Cities["town_a"].Civilians);+ Assert.Equal(1, Cities.Housed(done.State, done.State.Cities["town_a"])); // out of the home city's housing+ Assert.Equal(6, Cities.Housed(done.State, done.State.Cities["town_b"])); // into the nearest city's+ Assert.Contains(done.Why, w => w.Message == "Unit 1 is sent home: its 50 people are civilians in Town B now");+ Assert.Equal(done.State.Hash(), Step(c, Fresh(), new UnitOrder(1, Demobilization.SendHome)).State.Hash());+ }++ // R-UNIT-005: a unit that attacks and borders no front-bearing enemy waits for any armistice (the ruling's "no+ // enemy units in play"); an ALA unit, belonging to no front (Q-OBJ-1), names none.+ [Fact]+ public void NoFrontBearingEnemyWaitsForAnyArmistice()+ {+ var c = Load();+ var alone = State(c, Soldier(1, 3, 0));+ Assert.Equal("No armistice is signed", Demobilization.Check(c, alone, 1));+ alone.ChosenOptions["armistice_lebanon"] = "sign";+ Assert.Null(Demobilization.Check(c, alone, 1));+ Assert.Empty(Step(c, alone, new UnitOrder(1, Demobilization.SendHome)).State.Units);++ var bordered = State(c, Soldier(1, 3, 0), new Unit(4, "arab", 2, 0, side: "ala", strength: 3));+ Assert.Equal("No armistice is signed", Demobilization.Check(c, bordered, 1));+ bordered.ChosenOptions["armistice_jordan"] = "sign";+ Assert.Null(Demobilization.Check(c, bordered, 1));+ }++ // R-UNIT-005: the attack-target clause of Front() matters on its own. A gun attacks beyond the next hex+ // (Combat.InReach), so an enemy two hexes away that nothing borders still names the front: drop+ // `|| (attacks != null && ...)` and this becomes the any-armistice case and goes green after the Jordan signature.+ [Fact]+ public void AnAttackTargetTwoHexesAwayNamesItsFront()+ {+ var c = Load();+ var s = State(c, new Unit(1, "gun", 3, 0, side: "israel", strength: 2, order: Combat.Attack, orderTarget: "1,0"),+ new Unit(2, "enemy", 1, 0, side: "egypt", strength: 3));+ Assert.Equal("The armistice with Egypt is not signed", Demobilization.Check(c, s, 1));+ s.ChosenOptions["armistice_jordan"] = "sign"; // would open the order if the target did not count+ Assert.Equal("The armistice with Egypt is not signed", Demobilization.Check(c, s, 1));+ }++ // R-UNIT-005: the front is the nearest enemy unit's, ties by the lowest unit id; an attack order's target counts.+ [Fact]+ public void TheFrontIsTheNearestEnemysThenTheLowestIds()+ {+ var c = Load();+ var s = State(c, Soldier(1, 3, 0),+ new Unit(9, "syrian", 4, 0, side: "syria", strength: 3), new Unit(7, "enemy", 2, 0, side: "egypt", strength: 3));+ Assert.Equal("The armistice with Egypt is not signed", Demobilization.Check(c, s, 1)); // both border: unit 7 wins+ s.Units.Remove(7);+ Assert.Equal("The armistice with Syria is not signed", Demobilization.Check(c, s, 1));+ s.ChosenOptions["armistice_syria"] = "sign";+ Assert.Null(Demobilization.Check(c, s, 1));++ var attacking = State(c, Soldier(1, 3, 0, Combat.Attack, "2,0"), new Unit(2, "enemy", 2, 0, side: "egypt", strength: 3));+ Assert.Equal("The armistice with Egypt is not signed", Demobilization.Check(c, attacking, 1));+ }+}diff --git a/sim/Statecraft.Sim.Tests/RealContentTests.cs b/sim/Statecraft.Sim.Tests/RealContentTests.csindex 222659698..1c5f2d2ef 100644--- a/sim/Statecraft.Sim.Tests/RealContentTests.cs+++ b/sim/Statecraft.Sim.Tests/RealContentTests.cs@@ -36,6 +36,19 @@ public class RealContentTestsstatic readonly Content C = ContentLoader.Load(ContentRoot());static readonly DateTime Checked = new DateTime(2026, 10, 9);+ // R-UNIT-005's Signed helper ties Send home to the content by name: every front Prisoners.Fronts names must keep+ // its armistice_<front> event with a `sign` option, or Send home would quietly never open for that front.+ [Fact]+ public void EveryFrontHasItsArmisticeEventWithASignOption()+ {+ Assert.Equal(new[] { "egypt", "jordan", "lebanon", "syria" }, Prisoners.Fronts);+ foreach (var front in Prisoners.Fronts)+ {+ var e = Assert.Single(C.Events, e => e.Id == "armistice_" + front);+ Assert.Contains(e.Options, o => o.Id == "sign");+ }+ }+/// <summary>R-ALT-004 on the real content: every one of the 30 alternatives carries its record.</summary>[Fact]public void EveryAlternativeInContentSaysWhoProposedIt()diff --git a/sim/Statecraft.Sim/Demobilization.cs b/sim/Statecraft.Sim/Demobilization.csnew file mode 100644index 000000000..1dfd4d241--- /dev/null+++ b/sim/Statecraft.Sim/Demobilization.cs@@ -0,0 +1,85 @@+using System;+using System.Collections.Generic;+using System.Globalization;+using System.Linq;++namespace Statecraft.Sim+{+ /// <summary>Sending a unit home after the armistices (GDD Phase 7, #1309; docs/rules/mvp.md R-UNIT-005): the player's+ /// order "Send home" (owner, 22 October 2026, #1309), allowed only after the armistice on the unit's front; the unit+ /// leaves the map and its strength, in population units, joins the nearest of the twelve cities as civilians without a+ /// job (owner: "nearest ... as unemployed civilians"). No automatic demobilisation: the order is the only way home.</summary>+ public static class Demobilization+ {+ public const string SendHome = "send_home";++ /// <summary>The armistice event that signs each front (content/events/armistice_<front>.yaml); the sign option is+ /// `sign` in all four.</summary>+ static bool Signed(GameState s, string front) =>+ s.ChosenOptions.TryGetValue("armistice_" + front, out var o) && o == "sign";++ /// <summary>The front <paramref name="u"/> fights on (owner, 22 October 2026, #1309): of the enemy units it attacks+ /// (the hex its attack order names) or borders (an adjacent hex), the ones whose side belongs to a front (R-POW-004's+ /// map; the ALA and the local forces belong to none, Q-OBJ-1, so they name no front - accepted per maintainer comment 6341877062 on #1309), the nearest+ /// one's, ties by the lowest unit id. Null when no front-bearing enemy unit is attacked or bordered: the ruling's+ /// "no enemy units in play" case, which any signed armistice covers (accepted per maintainer comment 6341877062+ /// on #1309: a frontless enemy counts as none in play).</summary>+ internal static string? Front(GameState s, Unit u)+ {+ (int Q, int R)? attacks = null;+ if (u.Order == Combat.Attack)+ {+ var parts = u.OrderTarget.Split(',');+ attacks = (int.Parse(parts[0], CultureInfo.InvariantCulture), int.Parse(parts[1], CultureInfo.InvariantCulture));+ }+ var candidates = s.Units.Values+ .Where(e => e.Side != "" && e.Side != Movement.PlayerSide && Prisoners.FrontOf.ContainsKey(e.Side))+ .Where(e => MapActions.Distance(u.Q, u.R, e.Q, e.R) == 1 || (attacks != null && attacks.Value == (e.Q, e.R)))+ .ToList();+ if (candidates.Count == 0) return null;+ var pick = candidates.OrderBy(e => MapActions.Distance(u.Q, u.R, e.Q, e.R)).ThenBy(e => e.Id).First();+ return Prisoners.FrontOf[pick.Side];+ }++ /// <summary>R-UNIT-005's refusals: null when <see cref="Give"/> takes the order, else the reason shown to the player.+ /// Changes nothing: the unit card asks it before it offers Send home. Refused for an unknown unit, a unit with no+ /// side (a halutz) or an enemy unit, as the standing orders are; then while the armistice on the unit's front is+ /// unsigned, or - no enemy attacked or bordered - while no armistice is signed at all.</summary>+ public static string? Check(Content c, GameState s, int unitId)+ {+ if (!s.Units.TryGetValue(unitId, out var u)) return "There is no such unit";+ if (u.Side == "") return "Only a military unit takes that order";+ if (u.Side != Movement.PlayerSide) return "That unit is not yours";+ var front = Front(s, u);+ if (front != null)+ return Signed(s, front) ? null : $"The armistice with {PlayerText.Capitalised(front)} is not signed";+ return Prisoners.Fronts.Any(f => Signed(s, f)) ? null : "No armistice is signed";+ }++ /// <summary>R-UNIT-005: sends the unit home at once, like CancelTraining returns a cohort (R-TRAIN-002): the unit+ /// leaves the map and its strength joins the nearest city's civilians, employed count untouched, so the people count+ /// in the city's jobs and housing rules from the same turn. Refused, state untouched, with <see cref="Check"/>'s+ /// reason.</summary>+ internal static string? Give(Content c, GameState s, int unitId, List<Cause> why)+ {+ var refused = Check(c, s, unitId);+ if (refused != null) return refused;+ var u = s.Units[unitId];+ var city = Nearest(c, u.Q, u.R);+ s.Units.Remove(unitId);+ var x = s.Cities[city];+ s.Cities[city] = x.WithCounts(x.Civilians + u.Strength, x.Employed, x.Refugees);+ var ppu = c.RulesAt(s.Date).Mvp!.PeoplePerUnit;+ why.Add(new Cause("map", unitId.ToString(CultureInfo.InvariantCulture), u.Strength, FormattableString.Invariant(+ $"Unit {unitId} is sent home: its {u.Strength * ppu:N0} people are civilians in {PlayerText.Settlement(c, city)} now")));+ return null;+ }++ /// <summary>The nearest of the cities by hex distance to its settlement hex; a tie takes the city's id in ordinal+ /// order (agent default - the ruling sets no tie break).</summary>+ static string Nearest(Content c, int q, int r) => c.Cities+ .OrderBy(x => { var h = c.SettlementHexes.First(h => h.Id == x.Id); return MapActions.Distance(q, r, h.Q, h.R); })+ .ThenBy(x => x.Id, StringComparer.Ordinal)+ .First().Id;+ }+}diff --git a/sim/Statecraft.Sim/Prisoners.cs b/sim/Statecraft.Sim/Prisoners.csindex 0cbd939a6..6c8d6d5b3 100644--- a/sim/Statecraft.Sim/Prisoners.cs+++ b/sim/Statecraft.Sim/Prisoners.cs@@ -16,7 +16,7 @@ namespace Statecraft.Sim/// <summary>The front whose exchange card returns each enemy side's prisoners: the armistice agreements' parties/// (Q-OBJ-1), with Iraq under Jordan, whose agreement took over the Iraqi sector (Art. VI). The ALA and the local/// forces belong to no front, so no card returns their prisoners (they stay held to the game's end).</summary>- static readonly Dictionary<string, string> FrontOf = new Dictionary<string, string>(StringComparer.Ordinal)+ internal static readonly Dictionary<string, string> FrontOf = new Dictionary<string, string>(StringComparer.Ordinal){["egypt"] = "egypt", ["lebanon"] = "lebanon", ["syria"] = "syria", ["jordan"] = "jordan", ["iraq"] = "jordan",};diff --git a/sim/Statecraft.Sim/Simulation.cs b/sim/Statecraft.Sim/Simulation.csindex 0e54b7857..b9afd0399 100644--- a/sim/Statecraft.Sim/Simulation.cs+++ b/sim/Statecraft.Sim/Simulation.cs@@ -179,7 +179,10 @@ namespace Statecraft.Simreturn Projects.Stop(c, s, w.Unit, why);case UnitOrder o:if (o.Order == Combat.Attack) return Combat.Give(c, s, o.Unit, o.Q, o.R, why);- return o.Q != null || o.R != null ? "That order names no hex" : Orders.Give(c, s, o.Unit, o.Order, why);+ if (o.Q != null || o.R != null) return "That order names no hex";+ return o.Order == Demobilization.SendHome+ ? Demobilization.Give(c, s, o.Unit, why)+ : Orders.Give(c, s, o.Unit, o.Order, why);case StartProject p:return Projects.StartCity(c, s, p.ProjectKind, p.City, p.Q, p.R, why);case CancelProject p: