0 FUCKIN SMELLS ! OK 0 ! 0 ! 000000000000000000000000
continuous-integration/drone/push Build is passing Details

test_old_branch
Jérémy Mouyon 1 year ago
parent b2a987a663
commit 2e4c82d4ec

@ -35,7 +35,7 @@ namespace QwirkleClassLibrary
{ {
foreach (var cell in cells) foreach (var cell in cells)
{ {
if (cell.IsFree == false) if (!cell.IsFree)
{ {
return true; return true;
} }

@ -160,7 +160,7 @@ namespace QwirkleClassLibrary
{ {
foreach (var p in players) foreach (var p in players)
{ {
for (int j = 0; j < 6; j++) // ici pour test for (int j = 0; j < 6; j++)
{ {
int val = RandomNumberGenerator.GetInt32(0, bag.TilesBag.Count); int val = RandomNumberGenerator.GetInt32(0, bag.TilesBag.Count);
@ -249,13 +249,13 @@ namespace QwirkleClassLibrary
foreach (var t in tilesToSwap) foreach (var t in tilesToSwap)
{ {
if (player.RemoveTileToPlayer(t) == false) if (!player.RemoveTileToPlayer(t))
{ {
return false; return false;
} }
} }
if (DrawTiles(player) == false) if (!DrawTiles(player))
{ {
return false; return false;
} }
@ -374,13 +374,13 @@ namespace QwirkleClassLibrary
var dx = cell.GetX - x; var dx = cell.GetX - x;
var dy = cell.GetY - y; var dy = cell.GetY - y;
if (CheckExtendedSurroundingCells(t, x, y, dx, dy, b) == false) if (!CheckExtendedSurroundingCells(t, x, y, dx, dy, b))
{ {
return false; return false;
} }
} }
if (CheckTilesInLine(cellUsed, b, x, y) == false) if (!CheckTilesInLine(cellUsed, b, x, y))
{ {
OnPlaceTile(new PlaceTileNotifiedEventArgs(t, "isn't on the same line as the ones previously placed !")); OnPlaceTile(new PlaceTileNotifiedEventArgs(t, "isn't on the same line as the ones previously placed !"));
return false; return false;
@ -399,7 +399,7 @@ namespace QwirkleClassLibrary
} }
if(scoreBoard.TryAdd(player, score) == false) if(!scoreBoard.TryAdd(player, score))
{ {
scoreBoard[player] += score; scoreBoard[player] += score;
} }
@ -435,7 +435,7 @@ namespace QwirkleClassLibrary
return score; return score;
} }
private int CalculateLineScore(Cell cell, int dx, int dy, Board b) private static int CalculateLineScore(Cell cell, int dx, int dy, Board b)
{ {
int score = 0; int score = 0;
@ -459,7 +459,6 @@ namespace QwirkleClassLibrary
{ {
OnEndOfGame(new EndOfGameNotifiedEventArgs(player)); OnEndOfGame(new EndOfGameNotifiedEventArgs(player));
GameRunning = false; GameRunning = false;
//ScoreBoard.ToImmutableSortedDictionary();
return true; return true;
} }
} }

@ -30,12 +30,6 @@ namespace QwirkleClassLibrary
} }
} }
} }
/* Tile t = new Tile(Shape.Club, Color.Red);
Tile t2 = new Tile(Shape.Shuriken, Color.Red);
tiles.Add(t);
tiles.Add(t2);*/
TilesBag = tiles.AsReadOnly(); TilesBag = tiles.AsReadOnly();
} }

Loading…
Cancel
Save