Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

Map: Tel Aviv's White City at 4-8 storeys, with ribbon windows, roof terraces, pilotis and street palms (visual gap S2, refs #31) (#652)

Eyal Golanba97454a8dc5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d7eea4f38..ba66f9a69 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -411,6 +411,14 @@ adds a line under **Unreleased**; CI's `Changelog` job checks this (see `CONTRIB
nowhere in the hex has room (owner, 15 October 2026: "Yes, min 6 plots + a hut"). Gaza's edge has room for 4 tents
only, so it stays a box. Built on 26 August 1950: 17 camps of 25 are kits (was 15), and Ein Harod's is smaller (6
tents and 2 huts, was 10 and 2). Every structure still stands wholly inside its hex. No golden moves.
+- Tel Aviv's White City (visual gap S2, refs #31; owner rulings on #652, 15 October 2026). Its blocks are fewer and
+ larger: 27, at 1.67 times main's width (main drew 55). They stand four to eight storeys, in tiers of tall and low blocks,
+ with a height spread of 0.31. Each has ribbon windows along both long sides, a balcony band on every upper storey and a
+ flat roof terrace behind a parapet. A quarter stand on pilotis. 26 palms grow in the streets and in the open plots
+ between the blocks. Tel Aviv's census floors fall to 24 buildings and 24.5% / 21% cover, per the ruling "Lower floor to
+ ~30, wider blocks"; every other town's floor stays. All of it is in Tel Aviv's own kit mesh (no new draw), so a model that
+ replaces the town (#507) hides it whole. Haifa's Hadar keeps its blocks, and `Kit.shader` is not changed. Presentation
+ only.
- The map's region files (the 1948 sub-districts, the 1949 armistice lines, the 1948-49 control areas) are read
from baked runtime forms at boot instead of being parsed as YAML (`tools/regions_bake.py`, refs #321), as the
localities and the route paths are. The sub-districts are read once, for the camps and the region layers. A stale,
diff --git a/docs/visual-v1.md b/docs/visual-v1.md
index 7ba61e41d..3d8057b23 100644
--- a/docs/visual-v1.md
+++ b/docs/visual-v1.md
@@ -2600,6 +2600,92 @@ rebase onto #557, which adds the ma'abara kit and no village):
Harvard Divinity Bulletin (2019), https://bulletin.hds.harvard.edu/a-view-from-the-minaret/
- Kawfakha's mosque, a "thick square minaret 10-15 meters high" (Petersen 2001, pp. 195-196): https://en.wikipedia.org/wiki/Kawfakha
+## Tel Aviv's White City (visual gap S2, branch `visual/telaviv-bauhaus-s2`, refs #31)
+The 2026-10-15 gap audit (`.superpowers/visual-gaps-2026-10-15.md`, S2) found promo 03's Tel Aviv to be white Bauhaus
+blocks of four to eight storeys, with balcony bands, ribbon windows, roof terraces and palms in the streets, about 45-60 px
+wide in a 1920 frame. Main drew white boxes of two to seven storeys, about 25-30 px wide, with no street trees.
+
+**Owner rulings on #652** (2026-10-15):
+- "Lower floor to ~30, wider blocks": blocks about 1.6-2 times main's width, more height variety, and open plots for
+ palms. The first round kept the 50-building floor; its widest block that held it was 15.8 m, 1.2 times main's.
+- "Keep strips (promo look)": the ribbon windows stay.
+
+**Changes** (`SettlementKits.TelAviv.cs`; Tel Aviv only, on its own lattice style `Style.TelAviv`; Haifa's Hadar keeps
+`Style.WhiteBlock`):
+- **Blocks:**
+ - Size: 21-24 x 13-15 m real (main 12-16 x 9-11.5), on a 27 x 19 m pitch (main 18.5 x 13.5).
+ - Plots: every plot is built in the core, and nine in ten at the edge (main seven in ten).
+- **Storeys**, in three tiers as promo 03's skyline (promo over era, owner ruling 2026-10-10):
+ - tall blocks of seven or eight storeys, 60% of the core's and 35% at the edge;
+ - low blocks of four, 36%;
+ - the rest five or six.
+- **Facade:** a dark ribbon window runs along each long side of every storey, above the balcony bands that
+ `WhiteBlockDetail` already drew.
+ - It is geometry: two triangles per storey and side, set a hair proud of the wall.
+ - It is not done in `Kit.shader`, which is unchanged. At gameplay03 a 2 m window bay is under a pixel, so the shader's
+ discrete windows fade to their mean, while a strip stays a band.
+- **Pilotis** under a quarter of the blocks: a recessed, shaded ground storey under the block (the White City's first was
+ Engel House, 1933).
+- **Roof terraces:** a plastered parapet round every flat roof, warmer paving inside it, the stair head and, on four in ten,
+ the laundry room.
+- **Street palms** in Tel Aviv's own mesh:
+ - Where: street crossings, street middles, and a 3 x 3 grove over each plot left open.
+ - Size: each is as large as its spot allows, 0.7-1.6 times the city blocks' scale, with 85% of its crown clear of every
+ block.
+ - Order: they are placed after every place's houses and the camps, and before the small towns' fallback, so they move
+ nothing.
+ - Each claims a lot, so no tree grows through one.
+- **#507:** everything is in `tel_aviv_kit`, so a model that turns the town's kit off hides all of it.
+
+**Result** (editor census, `TownCensusTests`; main 98515c52 → branch):
+
+| Tel Aviv | main | branch |
+|---|---|---|
+| buildings (+wings) | 55 (+18) | 27 (+4) |
+| cover, whole / core | 25.5% / 25.6% | 27.2% / 23.7% |
+| storeys min / median / max | 2 / 5 / 7 | 4 / 5 / 8 |
+| height spread (cv) | 0.30 | 0.31 |
+| median block width (real m) | 13.1 | 21.9 (1.67x) |
+| street palms | 0 | 26 |
+
+- **Floors:** Tel Aviv's floors follow the ruling: 24 buildings (in `Floors` and `MainBuildings`), and cover 24.5% / 21%.
+ - All are about 10% under the measure.
+ - They were 50 buildings and 22.5% / 25% cover, with a `MainBuildings` row of 36.
+ - Every other town's floor is unchanged.
+- The ruling said about 30 buildings. At 1.6 times main's width the lattice holds 27; the sweep's 29-32-building
+ variants kept median widths of only 15.8-17 m. The owner then chose "27 wide blocks (Recommended)" (#652, 2026-10-15).
+- **Neighbours:**
+ - Jaffa draws 39 buildings (main 38), with cover 39.0% (main 39.0%).
+ - Petah Tikva draws 9 (main 9), with cover 20.7% (main 20.3%).
+ - The 1948 localities draw 2,898 houses (main 2,895).
+ - The other 22 towns are unchanged.
+- **Kit numbers** (editor `KITS` line): vertices 167,301 → 173,789, triangles 89,166 → 92,616, draws 64 → 64.
+- **Frame time:** not re-measured for this round. The vertices rise by 4%, less than the first round's 13%, which measured
+ as below (WebGL `?vprofile`, headless, 1920x1080, DPR 1; main c02d4eb0 and the first round back to back under one
+ exclusive `machine_lock`, 2026-10-15; `PROFILE summary` median avg / p95 in ms):
+
+ | pose, toggles | main c02d4eb0 | first round |
+ |---|---|---|
+ | gameplay03, all | 8.33 / 10 | 8.33 / 10 |
+ | gameplay03, -kits | 8.61 / 10 | 8.39 / 10 |
+ | diorama02, all | 15.65 / 17 | 15.89 / 17 (spread 0.84) |
+ | diorama02, -kits | 15.70 / 17 | 16.05 / 17 |
+
+ - The kits' cost (all minus -kits) is within the spread on both.
+ - The machine was shared with other sessions' jobs between runs. Diorama02's p95 of 17 ms is over the 16.7 ms budget on
+ main as well, so it is not this change.
+
+**Accuracy.** The White City article (https://en.wikipedia.org/wiki/White_City,_Tel_Aviv, checked 2026-10-15) has:
+- pilotis from 1933 (Engel House);
+- long, narrow balconies;
+- flat roofs used as shared space;
+- white and light colours;
+- small parks between the buildings;
+- the Geddes plan, 1925-29.
+
+It describes the windows as small and recessed, not ribbon windows. The strips follow promo 03 (owner ruling on #652,
+"Keep strips (promo look)"), as the storeys do.
+
## Issue #195: the water and the border lookups out of the terrain's fragment shader
- **Why.** promo-sea (#138) put the water shading (`ScWaterShade`, the breakers' `fwidth`, the footprint) in the terrain
graph's function, and promo-borders (#206) six neighbour fetches in `ScBorderApply`'s loop. Either one makes the shader
diff --git a/unity/Assets/Scripts/Map/Kits/SettlementKits.TelAviv.cs b/unity/Assets/Scripts/Map/Kits/SettlementKits.TelAviv.cs
new file mode 100644
index 000000000..535cd3d07
--- /dev/null
+++ b/unity/Assets/Scripts/Map/Kits/SettlementKits.TelAviv.cs
@@ -0,0 +1,235 @@
+#nullable enable
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace Statecraft.Game.Map.Kits
+{
+ /// <summary>Tel Aviv's White City (visual gap S2, docs/visual-v1.md "Tel Aviv's White City"): International Style
+ /// blocks of four to eight storeys on the Geddes plan's lattice, with continuous balconies, ribbon windows, flat roof
+ /// terraces behind a parapet, pilotis on some, and palms along the streets. Everything here goes into Tel Aviv's own
+ /// kit mesh, so a model that replaces the town (#507) hides it whole.</summary>
+ public static partial class SettlementKits
+ {
+ // ---- Tel Aviv's lattice and blocks (real metres, before the 60x city-block scale) ------------------------------
+
+ // Owner ruling on #652 (2026-10-15): "Lower floor to ~30, wider blocks": blocks about 1.6-2 times main's width, more
+ // height variety, open plots for palms. Sizes chosen by a sweep (docs/visual-v1.md, "Tel Aviv's White City"). Main drew
+ // 12-16 x 9-11.5 m blocks on an 18.5 x 13.5 m pitch.
+
+ /// <summary>Plot pitch along and across the street (real m).</summary>
+ const float TelAvivPitchU = 27f, TelAvivPitchV = 19f;
+ /// <summary>A block's width (along the street) and depth (real m): median 1.67 times main's.</summary>
+ const float TelAvivWMin = 21f, TelAvivWMax = 24f, TelAvivDMin = 13f, TelAvivDMax = 15f;
+ /// <summary>The share of plots built at the footprint's edge (the core builds every plot); the open ones take palms.</summary>
+ const float TelAvivEdge = 0.9f;
+ /// <summary>The storey tiers' shares: tall blocks (seven or eight storeys) from 60% in the core to 35% at the edge,
+ /// low blocks (four) 36%, the rest five or six.</summary>
+ const float TelAvivTallCore = 0.6f, TelAvivTallEdge = 0.35f, TelAvivLow = 0.36f;
+ /// <summary>Promo 03's Tel Aviv: four to eight storeys, the tallest in the core (owner ruling 2026-10-10: where the
+ /// promo departs from the era's three or four storeys, the promo wins).</summary>
+ public const int TelAvivMinStoreys = 4, TelAvivMaxStoreys = 8;
+ /// <summary>Share of Tel Aviv's blocks raised on pilotis: an open, recessed ground storey under the block.</summary>
+ const float PilotisShare = 0.25f;
+
+ /// <summary>A Tel Aviv block: four to eight storeys, taller near the heart.</summary>
+ static Spec PickTelAviv(float t, ref KitRandom rnd, float m)
+ {
+ float w = rnd.Range(TelAvivWMin, TelAvivWMax), d = rnd.Range(TelAvivDMin, TelAvivDMax);
+ // Three tiers, as promo 03's skyline: tall blocks of seven or eight storeys (most in the core), low blocks of four,
+ // and a few of five or six between them.
+ float u = rnd.Value(), tall = Mathf.Lerp(TelAvivTallCore, TelAvivTallEdge, Mathf.Clamp01(t));
+ int storeys = u < tall ? (rnd.Chance(0.85f) ? 8 : 7) : u < tall + TelAvivLow ? 4 : rnd.Range(5, 7);
+ return new Spec { w = w * m, d = d * m, h = storeys * 3.3f * m, storeys = storeys, lotR = 0.5f * Mathf.Sqrt(w * w + d * d) * m };
+ }
+
+ /// <summary>Draws one Tel Aviv block and records it in the census: lime-white plaster (a few cream), ribbon windows
+ /// along both long sides (Ribbons), a balcony band on every upper storey (WhiteBlockDetail), some on pilotis, some stepped, and a
+ /// flat roof terrace behind a parapet with its stair head.</summary>
+ static void TelAvivBlock(string id, Vector2 p, float yaw, Spec b, float bottom, float top, KitMesh km, ref KitRandom rnd)
+ {
+ float m = KitScale.CityBlocks, storey = 3.3f * m, a = yaw * Mathf.Deg2Rad, ca = Mathf.Cos(a), sa = Mathf.Sin(a);
+ Vector2 At(float u, float v) => p + new Vector2(u * ca - v * sa, u * sa + v * ca);
+ var wall = rnd.Chance(0.08f) ? Jitter(C(0.93f, 0.90f, 0.83f), ref rnd, 0.03f) : Jitter(WhitePlaster, ref rnd, 0.025f);
+ // The roof terrace's paving, a touch warmer and darker than the parapet, so the parapet reads as a rim.
+ var terrace = Jitter(C(0.84f, 0.81f, 0.76f), ref rnd, 0.03f);
+ bool pilotis = rnd.Chance(PilotisShare);
+ bool stepped = !pilotis && rnd.Chance(0.3f);
+ // The main block (c, w x d, h tall) and, on a stepped block, a lower wing at one end.
+ var c = p; float w = b.w, h = b.h, du = 0f;
+ if (stepped)
+ {
+ float share = rnd.Range(0.6f, 0.72f), side = rnd.Chance(0.5f) ? 1f : -1f;
+ float w2 = b.w * (1f - share), d2 = b.d * rnd.Range(0.75f, 1f), h2 = b.h - storey * rnd.Range(1, 3);
+ w = b.w * share; du = side * (b.w - w) * 0.5f; c = At(du, 0f);
+ var c2 = At(-side * (b.w - w2) * 0.5f, (b.d - d2) * 0.5f);
+ km.Box(c2.x, c2.y, yaw, w2 * 1.01f, d2, bottom, top, h2, wall, terrace, Facade.WhiteCity, m);
+ Ribbons(km, c2, yaw, w2, d2, top, h2, m);
+ RoofParapet(km, c2, yaw, w2, d2, top + h2, wall, m);
+ Record(id, "wing", c2, yaw, w2, d2, h2, wall);
+ }
+ if (pilotis)
+ {
+ // The ground storey stands back under the block, in the block's shadow; the block above starts one storey up.
+ var shade = C(wall.r / 255f * 0.62f, wall.g / 255f * 0.62f, wall.b / 255f * 0.64f);
+ km.Box(c.x, c.y, yaw, w * 0.72f, b.d * 0.6f, bottom, top, storey, shade, shade, Facade.Plain, m, roofed: true);
+ km.Box(c.x, c.y, yaw, w, b.d, top + storey - 0.3f * m, top + storey, h - storey, wall, terrace, Facade.WhiteCity, m);
+ Ribbons(km, c, yaw, w, b.d, top + storey, h - storey, m);
+ }
+ else
+ {
+ km.Box(c.x, c.y, yaw, w, b.d, bottom, top, h, wall, terrace, Facade.WhiteCity, m);
+ Ribbons(km, c, yaw, w, b.d, top, h, m);
+ }
+ WhiteBlockDetail(km, c, du, b.lotR, yaw, w, b.d, top, h, wall, terrace, m, ref rnd);
+ RoofParapet(km, c, yaw, w, b.d, top + h, wall, m);
+ // The stair head and the shared laundry room on the terrace.
+ float rw = w * rnd.Range(0.2f, 0.3f), rd = b.d * rnd.Range(0.3f, 0.42f);
+ var r1 = At(du + rnd.Range(-0.2f, 0.2f) * w, rnd.Range(-0.15f, 0.15f) * b.d);
+ km.Box(r1.x, r1.y, yaw, rw, rd, top + h - 2f, top + h, 2.8f * m, wall, terrace, Facade.Plain, m);
+ if (rnd.Chance(0.4f))
+ {
+ float lw = w * rnd.Range(0.14f, 0.2f), ld = b.d * rnd.Range(0.22f, 0.3f);
+ var r2 = At(du + (rnd.Chance(0.5f) ? 1f : -1f) * (0.5f * w - 0.6f * lw), rnd.Range(-0.2f, 0.2f) * b.d);
+ km.Box(r2.x, r2.y, yaw, lw, ld, top + h - 2f, top + h, 2.4f * m, wall, terrace, Facade.Plain, m);
+ }
+ Record(id, "building", p, yaw, b.w, b.d, b.h, wall);
+ }
+
+ /// <summary>Glass of the ribbon windows: near black, as promo 03's deep-set windows read.</summary>
+ static readonly Color32 RibbonGlass = new Color32(38, 42, 48, 0);
+
+ /// <summary>Tel Aviv's ribbon windows (the International Style's horizontal strip window): one unbroken dark strip per
+ /// storey along each long side of a w x d block whose walls rise <paramref name="h"/> from <paramref name="y0"/>, set
+ /// a hair proud of the wall (no z-fight), 1.4-2.6 m above each floor, so it shows above the balcony's parapet. Geometry,
+ /// not the facade shader (Kit.shader is left alone): at the gameplay zoom a 2 m window bay is under a pixel and the
+ /// shader's discrete windows fade to their mean, while a strip stays a band. Two triangles per storey and side.</summary>
+ static void Ribbons(KitMesh km, Vector2 c, float yaw, float w, float d, float y0, float h, float m)
+ {
+ float storey = 3.3f * m, a = yaw * Mathf.Deg2Rad, ca = Mathf.Cos(a), sa = Mathf.Sin(a);
+ float hu = 0.5f * w - 0.6f * m, off = 0.06f * m;
+ if (hu <= 0f) return;
+ Vector3 P(float u, float v, float y) => new Vector3(c.x + u * ca - v * sa, y, c.y + u * sa + v * ca);
+ int storeys = Mathf.RoundToInt(h / storey);
+ for (int k = 0; k < storeys; k++)
+ {
+ float y1 = y0 + k * storey + 1.4f * m, y2 = y0 + k * storey + 2.6f * m;
+ for (int side = -1; side <= 1; side += 2)
+ {
+ float v = side * (0.5f * d + off), u0 = side * hu, u1 = -side * hu; // clockwise seen from outside, as Box's walls
+ km.Face(P(u0, v, y1), P(u0, v, y2), P(u1, v, y2), P(u1, v, y1), RibbonGlass, Vector2.zero, Vector2.zero, Vector2.zero, Vector2.zero);
+ }
+ }
+ }
+
+ /// <summary>A flat roof's parapet: a low plastered rim round the terrace, inside the block's footprint.</summary>
+ static void RoofParapet(KitMesh km, Vector2 c, float yaw, float w, float d, float roofY, Color32 wall, float m)
+ {
+ float t = 0.35f * m, hgt = 1.0f * m, a = yaw * Mathf.Deg2Rad, ca = Mathf.Cos(a), sa = Mathf.Sin(a);
+ for (int side = -1; side <= 1; side += 2)
+ {
+ float v = side * 0.5f * (d - t), u = side * 0.5f * (w - t);
+ km.Box(c.x - v * sa, c.y + v * ca, yaw, w, t, roofY - 0.1f * m, roofY, hgt, wall, wall, Facade.Plain, m);
+ km.Box(c.x + u * ca, c.y + u * sa, yaw, t, d - 2f * t, roofY - 0.1f * m, roofY, hgt, wall, wall, Facade.Plain, m);
+ }
+ }
+
+ // ---- Street palms ------------------------------------------------------------------------------------------------
+
+ /// <summary>The most street palms Tel Aviv draws (a palm is about 110 triangles in the town's one mesh).</summary>
+ const int MaxStreetPalms = 260;
+
+ /// <summary>Palms along Tel Aviv's streets, as promo 03 shows them between the blocks: at the street crossings, the
+ /// streets' middles and in the plots left open, wherever the crown clears every block (its balconies included), every
+ /// other place's lots, the routes, the water and the beach strip; each as large as its spot allows, from
+ /// <see cref="MinPalmScale"/> to <see cref="MaxPalmScale"/> of the city blocks' scale (a small palm in a narrow street, a
+ /// tall one in an open plot). Build runs them after every place's houses and the camps, so they take only ground left free and move nothing;
+ /// each claims a lot, so no tree grows through one. Seeded by
+ /// its own stream: no block moves. Returns how many it drew.</summary>
+ static int StreetPalms(Settlement s, Vector2 centre, float R, float yawDeg, List<(Vector2 c, float hw, float hd)> blocks, KitGround ground,
+ KitMesh km, Lots lots, System.Func<Vector2, bool> mine, bool shore)
+ {
+ var rnd = new KitRandom(s.Id, 23);
+ float m = KitScale.CityBlocks, pu = TelAvivPitchU * m, pv = TelAvivPitchV * m;
+ float a = yawDeg * Mathf.Deg2Rad, ca = Mathf.Cos(a), sa = Mathf.Sin(a);
+ int nu = Mathf.CeilToInt(R / pu) + 1, nv = Mathf.CeilToInt(R / pv) + 1;
+ var spots = new List<(float d, int order, Vector2 uv)>();
+ for (int j = -nv; j <= nv; j++)
+ for (int i = -nu; i <= nu; i++)
+ {
+ // The crossing (half a pitch off each way), the long street's middle, the gap between two blocks of a row,
+ // and a 3 x 3 grid over a plot left open (a garden or a square: a grove of up to nine).
+ foreach (var (u, v) in new[] { ((i + 0.5f) * pu, (j + 0.5f) * pv), (i * pu, (j + 0.5f) * pv), ((i + 0.5f) * pu, j * pv),
+ ((i - 1f / 3f) * pu, (j - 1f / 3f) * pv), (i * pu, (j - 1f / 3f) * pv), ((i + 1f / 3f) * pu, (j - 1f / 3f) * pv),
+ ((i - 1f / 3f) * pu, j * pv), (i * pu, j * pv), ((i + 1f / 3f) * pu, j * pv),
+ ((i - 1f / 3f) * pu, (j + 1f / 3f) * pv), (i * pu, (j + 1f / 3f) * pv), ((i + 1f / 3f) * pu, (j + 1f / 3f) * pv) })
+ {
+ float d = Mathf.Sqrt(u * u + v * v);
+ if (d <= R) spots.Add((d, spots.Count, new Vector2(u, v)));
+ }
+ }
+ spots.Sort((x, y) => x.d != y.d ? x.d.CompareTo(y.d) : x.order.CompareTo(y.order));
+ int drawn = 0;
+ foreach (var (_, _, uv) in spots)
+ {
+ if (drawn >= MaxStreetPalms) break;
+ // Every spot draws its numbers whether or not a palm stands there.
+ float size = rnd.Range(0.85f, 1.05f), spin = rnd.Range(0f, 360f), lean = rnd.Range(-0.08f, 0.08f);
+ ulong seed = rnd.Next();
+ var p = centre + new Vector2(uv.x * ca - uv.y * sa, uv.x * sa + uv.y * ca);
+ if (!ground.Inside(p.x, p.y) || ground.Water(p.x, p.y) || !mine(p)) continue;
+ // The largest palm whose crown (but for its drooping tips) clears every block, within the scale range; 2%
+ // short of touching, so float rounding never puts a crown a hair inside a wall.
+ float scale = Mathf.Min(MaxPalmScale * size, 0.98f * Clearance(uv, blocks) / (PalmClear * PalmCrownM * m));
+ if (scale < MinPalmScale * size) continue;
+ float crown = PalmCrownM * scale * m;
+ if (!lots.Free(p, crown, s.Id, 0) || ground.OnRoute(p, crown)) continue;
+ if (shore && NearSea(p, yawDeg, 2f * (crown + BeachSetbackM), 2f * (crown + BeachSetbackM), ground)) continue;
+ lots.Add(new Lot { c = p, r = crown, id = s.Id });
+ Record(s.Id, "palm", p, 0f, 2f * crown * PalmClear, 2f * crown * PalmClear, 11.5f * scale * m, C(0.48f, 0.40f, 0.30f));
+ var prnd = new KitRandom(seed);
+ Palm(km, new Vector3(p.x, ground.Y(p.x, p.y), p.y), scale * m, spin, lean, ref prnd);
+ drawn++;
+ }
+ return drawn;
+ }
+
+ /// <summary>A palm's crown radius in real metres (Vegetation's palm: CrownRadiusM).</summary>
+ const float PalmCrownM = 4.6f;
+ /// <summary>A street palm's size as a share of the city blocks' scale: at least 0.7 (about 42x: two and a half
+ /// storeys beside a block), at most 1.6 (about 96x: as tall as a five- or six-storey block, as promo 03's palms stand); and the
+ /// share of its crown that must clear every block (the drooping frond tips may reach over a balcony).</summary>
+ const float MinPalmScale = 0.7f, MaxPalmScale = 1.6f, PalmClear = 0.85f;
+
+ /// <summary>The distance from lattice point <paramref name="uv"/> to the nearest block (centre and half extents in the
+ /// lattice's frame: Tel Aviv's blocks all stand square to its streets).</summary>
+ static float Clearance(Vector2 uv, List<(Vector2 c, float hw, float hd)> blocks)
+ {
+ float best = float.MaxValue;
+ foreach (var (c, hw, hd) in blocks)
+ {
+ float dx = Mathf.Max(0f, Mathf.Abs(uv.x - c.x) - hw), dy = Mathf.Max(0f, Mathf.Abs(uv.y - c.y) - hd);
+ best = Mathf.Min(best, dx * dx + dy * dy);
+ }
+ return Mathf.Sqrt(best);
+ }
+
+ /// <summary>A date palm in the town's mesh, as Vegetation's (a two-part trunk, nine drooping fronds), at
+ /// <paramref name="scale"/> world metres per real metre: about 110 triangles.</summary>
+ static void Palm(KitMesh km, Vector3 at, float scale, float spinDeg, float lean, ref KitRandom rnd)
+ {
+ var trunk = C(0.48f, 0.40f, 0.30f);
+ float sp = spinDeg * Mathf.Deg2Rad;
+ var dir = new Vector3(Mathf.Cos(sp), 0f, Mathf.Sin(sp));
+ var mid = at + (Vector3.up * 6f + dir * (0.35f + lean * 6f)) * scale;
+ var top = at + (Vector3.up * 11.5f + dir * (0.9f + lean * 11.5f)) * scale;
+ km.Shaft(at + Vector3.down * 0.6f * scale, mid, 0.30f * scale, 0.24f * scale, trunk, 5);
+ km.Shaft(mid, top, 0.24f * scale, 0.21f * scale, trunk, 5);
+ for (int i = 0; i < 7; i++)
+ {
+ float fa = sp + i * Mathf.PI * 2f / 7f + rnd.Range(-0.15f, 0.15f);
+ km.Frond(top, new Vector3(Mathf.Cos(fa), 0, Mathf.Sin(fa)), rnd.Range(3.8f, 4.6f) * scale, 1.1f * scale, rnd.Range(0.55f, 0.85f),
+ i % 3 == 0 ? C(0.40f, 0.44f, 0.20f) : C(0.33f, 0.38f, 0.17f));
+ }
+ }
+ }
+}
diff --git a/unity/Assets/Scripts/Map/Kits/SettlementKits.TelAviv.cs.meta b/unity/Assets/Scripts/Map/Kits/SettlementKits.TelAviv.cs.meta
new file mode 100644
index 000000000..1e784f046
--- /dev/null
+++ b/unity/Assets/Scripts/Map/Kits/SettlementKits.TelAviv.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 20c88fa2a629141129d7f68a63b0fc2a
\ No newline at end of file
diff --git a/unity/Assets/Scripts/Map/Kits/SettlementKits.cs b/unity/Assets/Scripts/Map/Kits/SettlementKits.cs
index ee8aebb65..8d3a48dc3 100644
--- a/unity/Assets/Scripts/Map/Kits/SettlementKits.cs
+++ b/unity/Assets/Scripts/Map/Kits/SettlementKits.cs
@@ -62,7 +62,8 @@ namespace Statecraft.Game.Map.Kits
Build(list, ground, out claimed, out _, columns);
/// <summary>One thing a kit placed, for the tests' and the docs' town census: a building (<see cref="Placed.Kind"/>
- /// "building", or "wing" for a block's lower part) or a landmark (its name: "mosque", "clock_tower", ...), with its
+ /// "building", or "wing" for a block's lower part), a street palm ("palm": its crown's square, its height) or a
+ /// landmark (its name: "mosque", "clock_tower", ...), with its
/// world footprint (centre, yaw in degrees, width and depth in m), its wall height (m) and wall colour.</summary>
public readonly struct Placed
{
@@ -142,7 +143,7 @@ namespace Statecraft.Game.Map.Kits
var streams = new Dictionary<string, KitRandom>(); var landmarks = new Dictionary<string, int>();
var spans = new Dictionary<string, List<(KitMesh km, int from, int to)>>(); // each locality's vertices in its tile
var townMeshes = new Dictionary<string, KitMesh>();
- var gameTowns = new List<(Settlement s, KitMesh km, int n, System.Func<int>? scatter)>();
+ var gameTowns = new List<(Settlement s, KitMesh km, int n, System.Func<int>? scatter, System.Func<int>? palms)>();
// Landmarks first: every game settlement's (largest first), then every locality's, each at its heart, before any
// houses. A village at a city's edge (Jammasin by Tel Aviv) keeps its heart, and no village takes a game town's
// landmark spot (review M8).
@@ -188,14 +189,14 @@ namespace Statecraft.Game.Map.Kits
// An Arab village or town (S1): a dense pack of small stone houses on the village lattice, as Lod's and
// Ramla's. The Jewish localities and mixed Nesher keep their scatter.
result.LocalityBuildings += ArchetypeOf(s) == Archetype.ArabTown && !Localities.IsMixed(s.Id)
- ? PlaceHouses(s, centres[s.Id], ground, tile, lots, ref rnd, null, out _, locality: true, keepOut: SmallerTowns(s))
+ ? PlaceHouses(s, centres[s.Id], ground, tile, lots, ref rnd, null, out _, out _, locality: true, keepOut: SmallerTowns(s))
: BuildOne(s, centres[s.Id], ground, tile, lots, Phase.Houses, ref rnd, landmarks[s.Id], null);
spans[s.Id].Add((tile, from, tile.VertexCount));
continue;
}
var km = townMeshes[s.Id];
- int n = landmarks[s.Id] + PlaceHouses(s, centres[s.Id], ground, km, lots, ref rnd, merged, out var scatter); // towns round 2: plot lattices
- gameTowns.Add((s, km, n, scatter));
+ int n = landmarks[s.Id] + PlaceHouses(s, centres[s.Id], ground, km, lots, ref rnd, merged, out var scatter, out var palms); // towns round 2: plot lattices
+ gameTowns.Add((s, km, n, scatter, palms));
}
foreach (var area in camps)
{
@@ -204,11 +205,16 @@ namespace Statecraft.Game.Map.Kits
}
// Last, the small towns' fallback houses (#317), largest place first: after every place's own houses and the camps,
// so they take only ground no other place builds on, and every other place draws as it would without them.
- foreach (var (s, km, n, scatter) in gameTowns)
+ // Before them, Tel Aviv's street palms (SettlementKits.TelAviv.cs), on ground no place's house or camp took, so they
+ // move none of those; the fallback then still moves nothing else (#317).
+ foreach (var t in gameTowns) t.palms?.Invoke();
+ var totals = new List<int>();
+ foreach (var t in gameTowns) totals.Add(t.n + (t.scatter?.Invoke() ?? 0));
+ for (int i = 0; i < gameTowns.Count; i++)
{
- int total = n + (scatter?.Invoke() ?? 0);
+ var (s, km, _, _, _) = gameTowns[i];
if (columns != null && km.VertexCount > 0) columns[s.Id] = km.Columns();
- result.Towns.Add((s, km.ToMesh(s.Id + "_kit"), total));
+ result.Towns.Add((s, km.ToMesh(s.Id + "_kit"), totals[i]));
}
// A locality's columns, from its own vertices in its tile (read before ToMesh drops the CPU copy).
if (columns != null)
@@ -326,8 +332,10 @@ namespace Statecraft.Game.Map.Kits
/// in <see cref="Pick"/>; lattice pitch, density and scale in <see cref="Grid"/>.</summary>
enum Style
{
- /// <summary>Tel Aviv's and Hadar HaCarmel's International Style blocks: white plaster, flat roofs (60x).</summary>
+ /// <summary>Hadar HaCarmel's International Style blocks: white plaster, flat roofs (60x).</summary>
WhiteBlock,
+ /// <summary>Tel Aviv's White City blocks (60x; SettlementKits.TelAviv.cs, visual gap S2).</summary>
+ TelAviv,
/// <summary>The plastered two- and three-storey centre of a large moshava (Petah Tikva, Rehovot) (60x).</summary>
TownBlock,
/// <summary>Jerusalem's new city: stone-faced blocks, Storrs' 1918 ordinance (60x).</summary>
@@ -356,6 +364,7 @@ namespace Statecraft.Game.Map.Kits
static (float pu, float pv, float jitter, float scale, float core, float t0, float edge) Grid(Style st) => st switch
{
Style.WhiteBlock => (18.5f, 13.5f, 0f, KitScale.CityBlocks, 1.00f, 0.60f, 0.70f),
+ Style.TelAviv => (TelAvivPitchU, TelAvivPitchV, 0f, KitScale.CityBlocks, 1.00f, 0.60f, TelAvivEdge),
Style.TownBlock => (20f, 16f, 0.03f, KitScale.CityBlocks, 1.00f, 0.30f, 0.80f),
Style.StoneBlock => (23f, 17.5f, 0.03f, KitScale.CityBlocks, 0.97f, 0.50f, 0.60f),
Style.OldHouse => (7.2f, 6.8f, 0.05f, KitScale.Houses, 1.00f, 0.60f, 0.75f),
@@ -384,6 +393,7 @@ namespace Statecraft.Game.Map.Kits
{
case "jerusalem": return new List<Lattice> { new Lattice(Style.OldHouse, 0f, 0), new Lattice(Style.StoneBlock, yaw, 1), new Lattice(Style.Village, yaw, 2) };
case "haifa": return new List<Lattice> { new Lattice(Style.WhiteBlock, yaw, 0), new Lattice(Style.OldHouse, yaw, 1) };
+ case "tel_aviv": return new List<Lattice> { new Lattice(Style.TelAviv, yaw, 0) };
}
switch (arch)
{
@@ -432,12 +442,13 @@ namespace Statecraft.Game.Map.Kits
/// <summary>Places a town's houses on its lattices, nearest the centre first; returns how many. When the lattice
/// places fewer than <see cref="SmallTownFloor"/>, <paramref name="scatter"/> is the town's fallback (#317), which
- /// Build runs after every other place's houses; else null. A 1948 <paramref name="locality"/> (an Arab village or
- /// town, S1) keeps its houses off the grid's edge midpoints, as its scatter did (review M10), and out of
- /// <paramref name="keepOut"/> (the smaller game settlements' ground), keeps no beach setback, and fills up to its own
- /// floor (<see cref="VillageFloor"/>) at once instead of the deferred fallback.</summary>
+ /// Build runs after every other place's houses; else null. <paramref name="palms"/> is Tel Aviv's street palms
+ /// (SettlementKits.TelAviv.cs), which Build runs after every place's houses and the camps; else null. A 1948
+ /// <paramref name="locality"/> (an Arab village or town, S1) keeps its houses off the grid's edge midpoints, as its
+ /// scatter did (review M10), and out of <paramref name="keepOut"/> (the smaller game settlements' ground), keeps no
+ /// beach setback, and fills up to its own floor (<see cref="VillageFloor"/>) at once instead of the deferred fallback.</summary>
static int PlaceHouses(Settlement s, Vector2 centre, KitGround ground, KitMesh km, Lots lots, ref KitRandom rnd, HashSet<string>? ignoreCellsOf,
- out System.Func<int>? scatter, bool locality = false, System.Func<Vector2, bool>? keepOut = null)
+ out System.Func<int>? scatter, out System.Func<int>? palms, bool locality = false, System.Func<Vector2, bool>? keepOut = null)
{
var arch = ArchetypeOf(s);
float R = FootprintRadiusM(s, ground.HexSizeM), reach = R * PlotReach;
@@ -507,6 +518,7 @@ namespace Statecraft.Game.Map.Kits
}
int placed = 0;
+ var blocks = new List<(Vector2 c, float hw, float hd)>(); // Tel Aviv's blocks in its lattice's frame, for its street palms
foreach (var (d, _, p0, li) in plots)
{
var L = lattices[li]; var g = Grid(L.Style);
@@ -529,7 +541,14 @@ namespace Statecraft.Game.Map.Kits
var drnd = new KitRandom(detail);
Emit(s.Id, L.Style, q, yaw, b, t, ground, km, ref drnd);
placed++;
+ if (L.Style == Style.TelAviv)
+ {
+ var dq = q - centre;
+ blocks.Add((new Vector2(dq.x * ca + dq.y * sa, -dq.x * sa + dq.y * ca), 0.5f * b.w, 0.5f * b.d + BalconyM * g.scale));
+ }
}
+ // Tel Aviv's street palms: Build runs them after every place's houses and the camps.
+ palms = blocks.Count == 0 ? null : () => StreetPalms(s, centre, R, lattices[0].Yaw, blocks, ground, km, lots, Mine, shore);
// A 1948 village's floor (S1): where the routes, a bigger neighbour's lots or the cell's seam take most of its
// plots, small village houses on free spots over its plot reach, nearest its heart first (KitRandom(id, 3)), at
@@ -701,6 +720,7 @@ namespace Statecraft.Game.Map.Kits
float w, d; int storeys;
switch (st)
{
+ case Style.TelAviv: return PickTelAviv(t, ref rnd, m);
case Style.WhiteBlock:
w = rnd.Range(12f, 16f); d = rnd.Range(9f, 11.5f);
// Taller near the centre, a few taller still: promo 03's five- to eight-storey skyline, above the real White
@@ -758,6 +778,7 @@ namespace Statecraft.Game.Map.Kits
float storey = 3.3f * m;
switch (st)
{
+ case Style.TelAviv: TelAvivBlock(id, p, yaw, b, bottom, top, km, ref rnd); break;
case Style.WhiteBlock:
case Style.TownBlock:
{
@@ -930,6 +951,9 @@ namespace Statecraft.Game.Map.Kits
/// <summary>The White City's wall plaster (sRGB): lime white, a touch cool, so the warm sun leaves it white rather than cream.</summary>
static readonly Color32 WhitePlaster = C(0.94f, 0.945f, 0.94f);
+ /// <summary>How far (real m) a White City balcony stands out from its wall.</summary>
+ const float BalconyM = 1.0f;
+
/// <summary>A White City block's balconies (settlements quick wins, #31): the International Style's continuous balconies
/// with solid plastered parapets, one per upper storey along a long side (most blocks on both), each a white band with
/// its shadow under it, as promo 03's Tel Aviv shows. The box is <paramref name="w"/> x <paramref name="d"/> at
@@ -939,7 +963,7 @@ namespace Statecraft.Game.Map.Kits
static void WhiteBlockDetail(KitMesh km, Vector2 c, float du, float lotR, float yaw, float w, float d, float ground, float h,
Color32 wall, Color32 roof, float m, ref KitRandom rnd)
{
- float storey = 3.3f * m, proj = 1.0f * m, parapet = 1.05f * m, slab = 0.2f * m;
+ float storey = 3.3f * m, proj = BalconyM * m, parapet = 1.05f * m, slab = 0.2f * m;
int storeys = Mathf.RoundToInt(h / storey);
float a = yaw * Mathf.Deg2Rad, ca = Mathf.Cos(a), sa = Mathf.Sin(a);
float reachV = 0.5f * d + proj;
@@ -1110,7 +1134,7 @@ namespace Statecraft.Game.Map.Kits
readonly Vector2 c; readonly float pu, pv, ca, sa;
public CityPlots(Vector2 centre, float yawDeg)
{
- var g = Grid(Style.WhiteBlock);
+ var g = Grid(Style.TelAviv);
c = centre; pu = g.pu * g.scale; pv = g.pv * g.scale;
ca = Mathf.Cos(yawDeg * Mathf.Deg2Rad); sa = Mathf.Sin(yawDeg * Mathf.Deg2Rad);
}
diff --git a/unity/Assets/Tests/EditMode/TownCensusTests.cs b/unity/Assets/Tests/EditMode/TownCensusTests.cs
index 13038c6ab..36dea89fa 100644
--- a/unity/Assets/Tests/EditMode/TownCensusTests.cs
+++ b/unity/Assets/Tests/EditMode/TownCensusTests.cs
@@ -21,11 +21,11 @@ public class TownCensusTests
internal sealed class Row
{
- public string Id = ""; public int Buildings, Wings; public List<string> Landmarks = new List<string>();
+ public string Id = ""; public int Buildings, Wings, Palms; public List<string> Landmarks = new List<string>();
public float Radius, Coverage, CoreCoverage; public int LandCells, CoreCells;
public float HMin, HMedian, HMax, HSpread; public int Colours; public Color MeanWall;
public override string ToString() =>
- $"CENSUS {Id} R={Radius:0} buildings={Buildings} wings={Wings} landmarks={Landmarks.Count}[{string.Join(",", Landmarks)}] " +
+ $"CENSUS {Id} R={Radius:0} buildings={Buildings} wings={Wings} palms={Palms} landmarks={Landmarks.Count}[{string.Join(",", Landmarks)}] " +
$"coverage={Coverage:P1} core={CoreCoverage:P1} land_cells={LandCells} h_min={HMin:0} h_med={HMedian:0} h_max={HMax:0} " +
$"h_cv={HSpread:0.00} colours={Colours} wall=({MeanWall.r:0.00},{MeanWall.g:0.00},{MeanWall.b:0.00})";
}
@@ -52,9 +52,11 @@ public class TownCensusTests
{
var w = map.Frame.ToWorld(s.Lon, s.Lat, 0); var centre = new Vector2(w.x, w.z);
float R = SettlementKits.FootprintRadiusM(s, g.HexSizeM);
- var mine = placed.Where(p => p.Id == s.Id && !Aggregate(p.Kind) && !p.InSea).ToList();
- var row = new Row { Id = s.Id, Radius = R, Buildings = mine.Count(p => p.Kind == "building"), Wings = mine.Count(p => p.Kind == "wing") };
- row.Landmarks = placed.Where(p => p.Id == s.Id && p.Kind != "building" && p.Kind != "wing").Select(p => p.Kind).ToList();
+ // Street palms are counted, but are neither built cover nor landmarks.
+ var mine = placed.Where(p => p.Id == s.Id && !Aggregate(p.Kind) && !p.InSea && p.Kind != "palm").ToList();
+ var row = new Row { Id = s.Id, Radius = R, Buildings = mine.Count(p => p.Kind == "building"), Wings = mine.Count(p => p.Kind == "wing"),
+ Palms = placed.Count(p => p.Id == s.Id && p.Kind == "palm") };
+ row.Landmarks = placed.Where(p => p.Id == s.Id && p.Kind != "building" && p.Kind != "wing" && p.Kind != "palm").Select(p => p.Kind).ToList();
int n = Mathf.CeilToInt(R / cellM);
int covered = 0, coreCovered = 0;
for (int j = -n; j <= n; j++)
@@ -193,7 +195,7 @@ public class TownCensusTests
["acre"] = 2, ["beersheba"] = 5, ["degania_alef"] = 1, ["ein_harod"] = 1, ["gaza"] = 15, ["hadera"] = 1, ["haifa"] = 30,
["hanita"] = 2, ["jaffa"] = 15, ["jerusalem"] = 70, ["lod"] = 5, ["nahalal"] = 1, ["nazareth"] = 5, ["netanya"] = 2,
["petah_tikva"] = 2, ["ramla"] = 5, ["rehovot"] = 3, ["revivim"] = 3, ["rishon_lezion"] = 2, ["rosh_pinna"] = 0,
- ["safed"] = 5, ["tel_aviv"] = 36, ["tiberias"] = 3, ["yad_mordechai"] = 0, ["zikhron_yaakov"] = 2,
+ ["safed"] = 5, ["tel_aviv"] = TelAvivFloor, ["tiberias"] = 3, ["yad_mordechai"] = 0, ["zikhron_yaakov"] = 2,
};
/// <summary>Floors measured on today's map for the towns whose main count is 0, which floors nothing (review of #570: a
@@ -265,13 +267,21 @@ public class TownCensusTests
/// "Towns round 2"): Tel Aviv 43 / 17.4% / 18.5%, Jaffa 33 / 32.6% / 31.9%, Haifa 45 / 21.0% / 20.6%, Jerusalem 110 /
/// 22.7% / 24.9%; main before it had 36, 15, 30 and 70 buildings. The building floors sit above main's counts, so a change
/// that thins a city back to round 1's sparse handful fails here; the cover floors are about 10% under the measure.
- /// Tel Aviv's row is #318's (owner ruling 2026-10-12): with its localities' landmarks at its street crossings it draws 55 /
- /// 25.2% / 25.6%, and its core floor is the ruling's 25%.</summary>
+ /// Tel Aviv's row was #318's (owner ruling 2026-10-12: 55 / 25.2% / 25.6% drawn, core floor 25%). Since the owner's ruling on
+ /// #652 (2026-10-15, "Lower floor to ~30, wider blocks") it is <see cref="TelAvivFloor"/>'s: fewer, larger blocks with
+ /// open plots between them; its localities' landmarks still stand at its street crossings.</summary>
internal static readonly Dictionary<string, (int buildings, float all, float core)> Floors = new Dictionary<string, (int, float, float)>
{
- ["tel_aviv"] = (50, 0.225f, 0.25f), ["jaffa"] = (28, 0.29f, 0.285f), ["haifa"] = (40, 0.19f, 0.185f), ["jerusalem"] = (95, 0.20f, 0.22f),
+ ["tel_aviv"] = (TelAvivFloor, 0.245f, 0.21f), ["jaffa"] = (28, 0.29f, 0.285f), ["haifa"] = (40, 0.19f, 0.185f), ["jerusalem"] = (95, 0.20f, 0.22f),
};
+ /// <summary>Tel Aviv's building floor here and in MainBuildings, and its cover floors in Floors (was 50 / 22.5% / 25%
+ /// and MainBuildings 36): owner ruling on #652, 2026-10-15, "Lower floor to ~30, wider blocks". Its blocks are about
+ /// 1.6-2 times main's width, with open plots for palms (visual gap S2). It draws 27 / 27.2% / 23.7%; the floors sit about
+ /// 10% under. The owner then chose 27 wide blocks over narrower ones to reach 30 (ruling on #652, 2026-10-15: "27 wide
+ /// blocks (Recommended)"). Every other town's floor is unchanged.</summary>
+ internal const int TelAvivFloor = 24;
+
/// <summary>#318 (owner ruling 2026-10-12): Tel Aviv's 1948 localities keep their hearts (#291, review M8). Every locality
/// whose centre lies inside Tel Aviv's footprint and whose kind has a landmark builds it, before any of the city's blocks.</summary>
[Test]
@@ -299,6 +309,46 @@ public class TownCensusTests
CollectionAssert.IsEmpty(bad);
}
+ /// <summary>Visual gap S2 (docs/visual-v1.md, "Tel Aviv's White City"; owner ruling on #652): Tel Aviv's blocks stand
+ /// four to eight storeys, with the median in promo 03's five to eight and a height spread (cv) of at least
+ /// <see cref="TelAvivHeightSpread"/> (main 0.30); its median block is at least <see cref="TelAvivMedianWidthM"/> wide (main
+ /// 13.1 m real, about half the promo's on-screen size); it draws at least <see cref="TelAvivPalms"/> street palms, and no
+ /// palm's crown reaches one of its blocks or wings.</summary>
+ [Test]
+ public void TelAvivIsThePromosWhiteCity()
+ {
+ var map = OpenMap();
+ var rows = Census(map, out var placed).ToDictionary(r => r.Id);
+ var ta = rows["tel_aviv"];
+ TestContext.WriteLine(ta);
+ float storey = 3.3f * KitScale.CityBlocks;
+ var blocks = placed.Where(p => p.Id == "tel_aviv" && p.Kind == "building").ToList();
+ var widths = blocks.Select(b => Mathf.Max(b.W, b.D)).OrderBy(w => w).ToList();
+ TestContext.WriteLine($"storeys min {blocks.Min(b => b.H) / storey:0.0} median {ta.HMedian / storey:0.0} max {ta.HMax / storey:0.0}; " +
+ $"median width {widths[widths.Count / 2] / KitScale.CityBlocks:0.0} real m; palms {ta.Palms}");
+ Assert.GreaterOrEqual(blocks.Min(b => b.H), SettlementKits.TelAvivMinStoreys * storey - 1f, "a block under four storeys");
+ Assert.That(ta.HMedian, Is.InRange(5f * storey - 1f, 8f * storey + 1f), "the median block is not five to eight storeys");
+ Assert.GreaterOrEqual(widths[widths.Count / 2], TelAvivMedianWidthM * KitScale.CityBlocks, "the median block's width");
+ Assert.GreaterOrEqual(ta.Palms, TelAvivPalms, "street palms");
+ Assert.GreaterOrEqual(ta.HSpread, TelAvivHeightSpread, "the blocks' height spread (cv)");
+ var bad = new List<string>();
+ var walls = placed.Where(p => p.Id == "tel_aviv" && (p.Kind == "building" || p.Kind == "wing")).ToList();
+ foreach (var palm in placed.Where(p => p.Id == "tel_aviv" && p.Kind == "palm"))
+ foreach (var b in walls)
+ {
+ float a = b.Yaw * Mathf.Deg2Rad, ca = Mathf.Cos(a), sa = Mathf.Sin(a);
+ var d = palm.C - b.C;
+ float u = Mathf.Max(0f, Mathf.Abs(d.x * ca + d.y * sa) - 0.5f * b.W), v = Mathf.Max(0f, Mathf.Abs(-d.x * sa + d.y * ca) - 0.5f * b.D);
+ if (u * u + v * v < 0.25f * palm.W * palm.W - 1f) { bad.Add($"a palm at {palm.C} reaches the {b.Kind} at {b.C}"); break; }
+ }
+ CollectionAssert.IsEmpty(bad.Take(20), $"{bad.Count} palms reach a block");
+ }
+
+ /// <summary>Floors for TelAvivIsThePromosWhiteCity, about 10% under the measure (docs/visual-v1.md, "Tel Aviv's White
+ /// City"): the median block's longer side in real metres (21.9: 1.67 times main's), the street palms (26) and the
+ /// height spread (0.31).</summary>
+ const float TelAvivMedianWidthM = 20.5f, TelAvivHeightSpread = 0.28f; const int TelAvivPalms = 23;
+
[Test]
public void TheCitiesCoverTheirGround()
{