Tests: every turret on a read side clears the base body by its extent and reach
The 0.8 tail-extent mutant survived the stop checks alone: it places turrets inside the distance, which only a placed turret's own clearance shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a54707d1d8
commit
cf242106fa
1 changed files with 5 additions and 0 deletions
|
|
@ -388,6 +388,11 @@ public sealed class StationPlacementTests : IDisposable
|
|||
{
|
||||
var side = arcs.Where(a => a * sign > 0).OrderBy(a => a * sign).ToList();
|
||||
sides++;
|
||||
foreach (var placed in side)
|
||||
{
|
||||
var at = 2 * orbit.Data.Distance * Math.Abs((float) Math.Sin(PI * (orbit.Data.Phase + placed / circumference - zone.Orbits[source[0]].Data.Phase)));
|
||||
Assert.True(at >= (extent + reach) * .999f, $"seed {built.Seed}: a turret sits {at} from its base, inside {extent + reach}");
|
||||
}
|
||||
var wouldBe = (side.Count == 0 ? 0f : side[side.Count - 1]) + sign * ((side.Count == 0 ? Contacts.Radius(station) : reach) + 2 * reach);
|
||||
var phase = orbit.Data.Phase + wouldBe / circumference;
|
||||
var chord = 2 * orbit.Data.Distance * Math.Abs((float) Math.Sin(PI * (phase - zone.Orbits[source[0]].Data.Phase)));
|
||||
|
|
|
|||
Loading…
Reference in a new issue