namespace Models.Game;

public class Player
{
    public string Pseudo { get; private set; }

    public string ProfilePicture { get; private set; }

    public string CreationDate { get; private set; }

    public string LastPlayed { get; private set; }

    public Player()
    {
        Pseudo = "Player";
        ProfilePicture = "DefaultProfilePicture";
    }

    public Player(string pseudo, string profilePicture = "DefaultProfilePicture")
    {
        Pseudo = pseudo;
        ProfilePicture = profilePicture;
    }



    public Operation ChooseOperation()
    {
        return Operation.LOWER;
    }

    public override bool Equals(object? obj)
    {
        if (obj == null || GetType() != obj.GetType())
        {
            return false;
        }
        Player c = (Player)obj;
        return (Pseudo == c.Pseudo);
    }

    // Redefinition de la méthode de Hash pour l'opérateur ==
    public override int GetHashCode()
    {
        return Pseudo.GetHashCode();
    }
}