@
CI / build-test (push) Failing after 1m8s

Add MrGameEng.AI utility-AI module; format codebase with CSharpier

New MrGameEng.AI module (ResponseCurve, Consideration, UtilityAction,
UtilityAi selector, Blackboard) plus CSharpier formatting applied across
the whole engine. Documents the CSharpier convention in CLAUDE.md.
@
This commit is contained in:
Leonid Pershin
2026-06-12 07:19:10 +03:00
parent 4ae730cafa
commit fd6343bd09
96 changed files with 2066 additions and 589 deletions
@@ -8,10 +8,7 @@ public class FlowFieldTests
[Fact]
public void Build_DistancesGrowFromGoal_DirectionsDescend()
{
var grid = new TestGrid(
".....",
".###.",
".....");
var grid = new TestGrid(".....", ".###.", ".....");
var builder = new FlowFieldBuilder(grid);
var field = new FlowField();
@@ -25,7 +22,11 @@ public class FlowFieldTests
{
for (var x = 0; x < grid.Width; x++)
{
if (!grid.IsPassable(x, y) || !field.IsReachable(x, y) || field.DistanceAt(x, y) == 0f)
if (
!grid.IsPassable(x, y)
|| !field.IsReachable(x, y)
|| field.DistanceAt(x, y) == 0f
)
{
continue;
}
@@ -34,8 +35,10 @@ public class FlowFieldTests
Assert.NotEqual(Vector2.Zero, direction);
var nx = x + Math.Sign(MathF.Round(direction.X * 10f));
var ny = y + Math.Sign(MathF.Round(direction.Y * 10f));
Assert.True(field.DistanceAt(nx, ny) < field.DistanceAt(x, y),
$"direction at ({x},{y}) does not descend");
Assert.True(
field.DistanceAt(nx, ny) < field.DistanceAt(x, y),
$"direction at ({x},{y}) does not descend"
);
}
}
}
@@ -43,10 +46,7 @@ public class FlowFieldTests
[Fact]
public void Build_UnreachablePocket_IsFlagged()
{
var grid = new TestGrid(
"..#..",
"..#..",
"..#..");
var grid = new TestGrid("..#..", "..#..", "..#..");
var builder = new FlowFieldBuilder(grid);
var field = new FlowField();