You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Trek12_API/Sources/Model/Player.cs

40 lines
790 B

namespace Model;
//public class Player : IEquatable<Player>
public class Player
{
public string Pseudo
{
get => pseudo;
set
{
if (value == null)
{
pseudo = "";
return;
}
pseudo = value;
}
}
private string pseudo = "";
public Stats Stats { get; set; }
public Player(string pseudo)
{
Pseudo = pseudo;
Stats = new Stats();
}
//nécessaire ?
//public bool Equals(Player? other)
// => Pseudo.Equals(other?.Pseudo);
//997 ou un autre chiffre, à voir
//public override int GetHashCode()
// => Pseudo.GetHashCode() % 997;
//public override string ToString()
// => $"{Pseudo}";
}