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.
3.01-QCM_MuscuMaths/Blazor/Models/Lobby.cs

22 lines
606 B

namespace Blazor.Models
{
public class Lobby
{
public int Id { get; private set; }
public string Name { get; private set; }
public string? Password { get; private set; }
public int NbPlayers { get; private set; }
public Lobby(int id, string name, string? password = null, int nbPlayers = 0)
{
Id = id;
Name = name;
Password = password;
NbPlayers = nbPlayers;
}
public void addPlayers(int nb) { NbPlayers += nb; }
public void removePlayers(int nb) { NbPlayers -= nb; }
}
}