diff --git a/Blazor/Models/Administrator.cs b/Blazor/Models/Administrator.cs index 6de9703..9673ccd 100644 --- a/Blazor/Models/Administrator.cs +++ b/Blazor/Models/Administrator.cs @@ -15,10 +15,10 @@ namespace Blazor.Models Administrator(int id, string username, string password) { - this.Id = id; - this.Username = username; + Id = id; + Username = username; // got this hashed password - this.HashedPassword = Convert.ToBase64String(KeyDerivation.Pbkdf2( + HashedPassword = Convert.ToBase64String(KeyDerivation.Pbkdf2( password: password!, salt: salt, prf: KeyDerivationPrf.HMACSHA256, diff --git a/Blazor/Models/Lobby.cs b/Blazor/Models/Lobby.cs index 7fe7b0e..668714d 100644 --- a/Blazor/Models/Lobby.cs +++ b/Blazor/Models/Lobby.cs @@ -5,17 +5,17 @@ namespace Blazor.Models 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 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; + NbPlayers = nbPlayers; } - public void addPlayers(int nb) { nbPlayers += nb; } - public void removePlayers(int nb) { nbPlayers -= nb; } + public void addPlayers(int nb) { NbPlayers += nb; } + public void removePlayers(int nb) { NbPlayers -= nb; } } } diff --git a/Blazor/Models/Question.cs b/Blazor/Models/Question.cs index c279686..ead9caa 100644 --- a/Blazor/Models/Question.cs +++ b/Blazor/Models/Question.cs @@ -9,7 +9,7 @@ public int Difficulty { get; set; } public int NbFails { get; private set; } - public Question(int id, string content, int idChapter, int difficulty, int nbFails, int? idAnswerGood = null) + public Question(int id, string content, int idChapter, int difficulty, int nbFails = 0, int? idAnswerGood = null) { Id = id; Content = content;