code smelles
continuous-integration/drone/push Build is passing Details

test_old_branch
Jérémy Mouyon 12 months ago
parent 12da82978d
commit 7d4fb356fd

@ -5,8 +5,8 @@ namespace QwirkleClassLibrary;
public class Cell public class Cell
{ {
private int x; private readonly int x;
private int y; private readonly int y;
private Tile? tile = null; private Tile? tile = null;
public Cell(int x, int y) public Cell(int x, int y)

@ -11,7 +11,7 @@ namespace QwirkleClassLibrary
{ {
public class Game : IPlayer, IRules public class Game : IPlayer, IRules
{ {
private TileBag bag; private readonly TileBag bag;
public bool GameRunning { get; private set; } public bool GameRunning { get; private set; }
private Board board; private Board board;
@ -48,7 +48,7 @@ namespace QwirkleClassLibrary
} }
players.Add(CreatePlayer(playerTag)); players.Add(CreatePlayer(playerTag));
scores.Add(new Score(players[players.Count])); scores.Add(new Score(players[players.Count-1]));
return true; return true;
} }

@ -8,8 +8,8 @@ namespace QwirkleClassLibrary
{ {
public struct Score public struct Score
{ {
private int score; private int score { get; set; }
private string playerTag; public string playerTag { get; }
public Score(Player p) public Score(Player p)
{ {
@ -23,11 +23,5 @@ namespace QwirkleClassLibrary
playerTag = p.NameTag; playerTag = p.NameTag;
} }
} }
public int GetScore
{
get { return score; }
}
} }
} }

@ -10,8 +10,8 @@ namespace QwirkleClassLibrary
{ {
public class Tile public class Tile
{ {
private Shape shape; private readonly Shape shape;
private Color color; private readonly Color color;
public Tile(Shape sh, Color co) public Tile(Shape sh, Color co)
{ {
shape = sh; shape = sh;

Loading…
Cancel
Save