|
|
|
@ -18,13 +18,13 @@ namespace Model
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class Lobby
|
|
|
|
|
{
|
|
|
|
|
private uint id;
|
|
|
|
|
private int id;
|
|
|
|
|
private string? name;
|
|
|
|
|
private string? password;
|
|
|
|
|
private uint nbPlayers;
|
|
|
|
|
private uint? idCreator;
|
|
|
|
|
private int nbPlayers;
|
|
|
|
|
private int? idCreator;
|
|
|
|
|
// getters and setters of attributes
|
|
|
|
|
public uint Id
|
|
|
|
|
public int Id
|
|
|
|
|
{
|
|
|
|
|
get => id;
|
|
|
|
|
private set { id = value; }
|
|
|
|
@ -39,12 +39,12 @@ namespace Model
|
|
|
|
|
get => password == null ? "" : password;
|
|
|
|
|
private set { password = value == "" ? null : value; }
|
|
|
|
|
}
|
|
|
|
|
public uint NbPlayers
|
|
|
|
|
public int NbPlayers
|
|
|
|
|
{
|
|
|
|
|
get => nbPlayers;
|
|
|
|
|
set { nbPlayers = value; }
|
|
|
|
|
}
|
|
|
|
|
public uint? IdCreator
|
|
|
|
|
public int? IdCreator
|
|
|
|
|
{
|
|
|
|
|
get => idCreator;
|
|
|
|
|
private set { idCreator = value; }
|
|
|
|
@ -58,7 +58,7 @@ namespace Model
|
|
|
|
|
/// <param name="password">the password require to access to 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, uint? idCreator, string password = "", uint nbPlayers = 0, uint id = 0)
|
|
|
|
|
public Lobby(string name, int? idCreator, string password = "", int nbPlayers = 0, int id = 0)
|
|
|
|
|
{
|
|
|
|
|
Name = name;
|
|
|
|
|
IdCreator = idCreator;
|
|
|
|
|