diff --git a/Chrono/Model/CardData.cs b/Chrono/Model/CardData.cs index 4587e3d..6b66680 100644 --- a/Chrono/Model/CardData.cs +++ b/Chrono/Model/CardData.cs @@ -7,6 +7,15 @@ public class CardData public int? Cost { get; init; } public int? Attack { get; init; } public int? Health { get; init; } + + public float StatEfficiency() + { + if(Cost == 0) return 0; + if (Attack != null && Cost != null && Health != null) return MathF.Round((float)((Health + Attack) / (float)Cost),2); + return 0; + } + + public string? Description { get; init; } public string? Faction { get; init; } public string? Set { get; init; } diff --git a/Chrono/Web/Pages/Agents.razor b/Chrono/Web/Pages/Agents.razor index 5771d34..c87161e 100644 --- a/Chrono/Web/Pages/Agents.razor +++ b/Chrono/Web/Pages/Agents.razor @@ -3,18 +3,13 @@ Agents
-
-

Agents

-

@agents.Count agents in the database

-
- @@ -35,6 +30,11 @@ + + +