This repository has been archived on 2023-11-16. You can view files and clone it, but cannot push or open issues or pull requests.
GOA/godot/Player.cs
2023-09-24 12:10:42 +02:00

37 lines
763 B
C#

public record Player
{
public string Name { get; init; }
public nuint Strength { get; init; }
public nuint Perception { get; init; }
public nuint Endurance { get; init; }
public nuint Charisma { get; init; }
public nuint Intelligence { get; init; }
public nuint Agility { get; init; }
public nuint Luck { get; init; }
// public Person(string Name, nuint Strength, nuint Perception, nuint Endurance, nuint Charisma, nuint Intelligence, nuint Agility, nuint Luck, )
// {
// Name
//}
public bool isValid()
{
return StatSum() <= 35;
}
public nint StatSum()
{
nuint sum = 0;
sum += Strength;
sum += Perception;
sum += Endurance;
sum += Charisma;
sum += Intelligence;
sum += Agility;
sum += Luck;
return (nint) sum;
}
}