updating ignore

This commit is contained in:
hz
2026-05-18 14:54:37 -05:00
parent afeb9cf625
commit 32b953aa61
62 changed files with 295 additions and 2313 deletions
-35
View File
@@ -44,39 +44,4 @@ public class LocationResponse
IsVisible = true
};
public static LocationResponse FromCoordinate(int q, int r) => new()
{
Q = q,
R = r,
Terrain = LocationTerrain.FromCoordinate(q, r),
Kind = "Open",
Level = 1,
UpdatedAtUtc = DateTime.UtcNow,
IsVisible = true
};
}
public static class LocationTerrain
{
public static string FromCoordinate(int q, int r)
{
var height = Math.Max(Math.Max(Math.Abs(q), Math.Abs(r)), Math.Abs(-q - r));
if (height <= 1)
{
return "Command";
}
if ((q * 19 + r * 7) % 5 == 0)
{
return "Highland";
}
if ((q + r) % 4 == 0)
{
return "Forest";
}
if ((q * 3 - r) % 6 == 0)
{
return "Ore";
}
return "Field";
}
}