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.
43 lines
1.2 KiB
43 lines
1.2 KiB
using CoreLibrary.Core;
|
|
using CoreLibrary.Events;
|
|
|
|
namespace CoreLibrary.Joueurs
|
|
{
|
|
/// <summary>
|
|
/// Classe représentant un joueur.
|
|
/// </summary>
|
|
public class Joueur
|
|
{
|
|
/// <summary>
|
|
/// Le nom du joueur.
|
|
/// </summary>
|
|
public string Nom { get; private init; }
|
|
|
|
/// <summary>
|
|
/// Le plateau du joueur.
|
|
/// </summary>
|
|
public Plateau Plateau { get; private init; }
|
|
|
|
/// <summary>
|
|
/// Evénement appelé pour jouer un code.
|
|
/// </summary>
|
|
public event EventHandler<JouerCodeEventArgs>? JouerCode;
|
|
|
|
/// <summary>
|
|
/// Appel de l'événement JouerCode.
|
|
/// </summary>
|
|
private void QuandJouerCode(Code code) => JouerCode?.Invoke(this, new JouerCodeEventArgs(code));
|
|
|
|
/// <summary>
|
|
/// Crée une nouvelle instance de joueur avec un nom et un plateau spécifié.
|
|
/// </summary>
|
|
/// <param name="nom">Le nom du joueur.</param>
|
|
/// <param name="plateau">Le plateau du joueur.</param>
|
|
public Joueur(string nom, Plateau plateau)
|
|
{
|
|
Nom = nom;
|
|
Plateau = plateau;
|
|
}
|
|
}
|
|
}
|