création des classes
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
f8daa2bbe8
commit
b8256db24d
@ -0,0 +1,21 @@
|
||||
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;
|
||||
this.nbPlayers = nbPlayers;
|
||||
}
|
||||
|
||||
public void addPlayers(int nb) { nbPlayers += nb; }
|
||||
public void removePlayers(int nb) { nbPlayers -= nb; }
|
||||
}
|
||||
}
|
Loading…
Reference in new issue