test sonar
continuous-integration/drone/push Build is passing Details

test_old_branch
Jérémy Mouyon 1 year ago
parent 51d771537f
commit 3044de9796

@ -14,16 +14,13 @@ namespace QwirkleClassLibrary
public bool GameRunning { get; private set; }
private Board board;
public ReadOnlyCollection<Player> PlayerList { get; }
private readonly List<Player> players;
public ReadOnlyCollection<Player> PlayerList => players.AsReadOnly();
private readonly List<Player> players = new();
public Game()
{
board = new Board();
bag = new TileBag(3);
players = new List<Player>();
PlayerList = players.AsReadOnly();
}
public bool AddPlayerInGame(string? playerTag)

@ -10,7 +10,7 @@ namespace QwirkleClassLibrary
public class Player
{
public ReadOnlyCollection<Tile> Tiles => playerTiles.AsReadOnly();
private readonly List<Tile> playerTiles;
private readonly List<Tile> playerTiles = new();
public Player(string name)
{
@ -20,8 +20,6 @@ namespace QwirkleClassLibrary
}
NameTag = name;
playerTiles = new List<Tile>();
}
public string NameTag { get; }

Loading…
Cancel
Save