From 3ef0ac21ebe02c4e890cf878c2aeb87d8386ad89 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 17 Oct 2026 05:31:08 +0200 Subject: [PATCH] RunStartTests: the belt race takes the first arena that has a belt Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/RunStartTests.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/RunStartTests.cs b/tests/Aetheria.Shared.Tests/RunStartTests.cs index ce853d07c..62ce0f7ba 100644 --- a/tests/Aetheria.Shared.Tests/RunStartTests.cs +++ b/tests/Aetheria.Shared.Tests/RunStartTests.cs @@ -311,8 +311,14 @@ public sealed partial class RunStartTests : IDisposable [Fact] public void NoOrbitStandsStillAgainstItsParent() { - var zone = Arena(false); // no ships: nothing but the zone runs - Assert.True(zone.AsteroidBelts.Count > 0, "the arena has an asteroid belt to race against"); + // No ships: nothing but the zone runs. Belts are rarer than they were, so the first galaxy seed whose entrance holds one. + Zone zone = null; + for (uint seed = GalaxySeed; zone == null && seed < GalaxySeed + 60; seed++) + { + var (_, arena, _, _) = Launch(new Scripted(false, _ => { }, seed), Inputs()); + if (arena.AsteroidBelts.Count > 0) zone = arena; + } + Assert.True(zone != null, "no arena of the first 60 seeds has an asteroid belt to race against"); float2 Relative(Orbit orbit, bool previous) => (previous ? orbit.PreviousPosition : orbit.Position) - (zone.Orbits.TryGetValue(orbit.Data.Parent.Key, out var parent) ? previous ? parent.PreviousPosition : parent.Position : orbit.Data.FixedPosition);