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)
{
if (cell.IsFree == false)
if (!cell.IsFree)
{
return true;
}

@ -160,7 +160,7 @@ namespace QwirkleClassLibrary
{
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);
@ -249,13 +249,13 @@ namespace QwirkleClassLibrary
foreach (var t in tilesToSwap)
{
if (player.RemoveTileToPlayer(t) == false)
if (!player.RemoveTileToPlayer(t))
{
return false;
}
}
if (DrawTiles(player) == false)
if (!DrawTiles(player))
{
return false;
}
@ -374,13 +374,13 @@ namespace QwirkleClassLibrary
var dx = cell.GetX - x;
var dy = cell.GetY - y;
if (CheckExtendedSurroundingCells(t, x, y, dx, dy, b) == false)
if (!CheckExtendedSurroundingCells(t, x, y, dx, dy, b))
{
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 !"));
return false;
@ -399,7 +399,7 @@ namespace QwirkleClassLibrary
}
if(scoreBoard.TryAdd(player, score) == false)
if(!scoreBoard.TryAdd(player, score))
{
scoreBoard[player] += score;
}
@ -435,7 +435,7 @@ namespace QwirkleClassLibrary
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;
@ -459,7 +459,6 @@ namespace QwirkleClassLibrary
{
OnEndOfGame(new EndOfGameNotifiedEventArgs(player));
GameRunning = false;
//ScoreBoard.ToImmutableSortedDictionary();
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();
}

Loading…
Cancel
Save