...model fix
This commit is contained in:
@@ -8,12 +8,9 @@ public class CardData
|
||||
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 float StatEfficiency => Cost is > 0 && Attack is not null && Health is not null
|
||||
? MathF.Round((Health.Value + Attack.Value) / (float)Cost.Value, 2)
|
||||
: 0;
|
||||
|
||||
|
||||
public string? Description { get; init; }
|
||||
|
||||
Reference in New Issue
Block a user