|
|
|
@ -15,7 +15,6 @@ namespace Model
|
|
|
|
|
/// name : name of the lobby
|
|
|
|
|
/// password : password require to access at the lobby
|
|
|
|
|
/// idCreator : identifier of the creator player
|
|
|
|
|
/// creator : the creator player
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class Lobby
|
|
|
|
|
{
|
|
|
|
@ -24,7 +23,6 @@ namespace Model
|
|
|
|
|
private string? password;
|
|
|
|
|
private uint nbPlayers;
|
|
|
|
|
private uint? idCreator;
|
|
|
|
|
private Player creator;
|
|
|
|
|
// getters and setters of attributes
|
|
|
|
|
public uint Id
|
|
|
|
|
{
|
|
|
|
@ -51,11 +49,6 @@ namespace Model
|
|
|
|
|
get => idCreator;
|
|
|
|
|
private set { idCreator = value; }
|
|
|
|
|
}
|
|
|
|
|
public Player Creator
|
|
|
|
|
{
|
|
|
|
|
get => creator;
|
|
|
|
|
set { creator = value; idCreator = value.Id; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// constructor of a lobby
|
|
|
|
@ -63,12 +56,12 @@ namespace Model
|
|
|
|
|
/// <param name="name">the name of the lobby</param>
|
|
|
|
|
/// <param name="creator">the creator</param>
|
|
|
|
|
/// <param name="password">the password require to access to the lobby</param>
|
|
|
|
|
/// <param name="nbPlayer">the number of players in the lobby</param>
|
|
|
|
|
/// <param name="nbPlayers">the number of players in the lobby</param>
|
|
|
|
|
/// <param name="id">the id of the lobby</param>
|
|
|
|
|
public Lobby(string name, Player creator, string password = "", uint nbPlayers = 0, uint id = 0)
|
|
|
|
|
public Lobby(string name, uint? idCreator, string password = "", uint nbPlayers = 0, uint id = 0)
|
|
|
|
|
{
|
|
|
|
|
Name = name;
|
|
|
|
|
Creator = creator;
|
|
|
|
|
IdCreator = idCreator;
|
|
|
|
|
Password = password;
|
|
|
|
|
NbPlayers = nbPlayers;
|
|
|
|
|
Id = id;
|
|
|
|
|