I've done it ! For fuck sake I've done it !
continuous-integration/drone/push Build is passing Details

test_old_branch
Jules LASCRET 11 months ago
parent b32d8b5e8e
commit 98b840235e

@ -401,8 +401,13 @@ namespace QwirkleClassLibrary.Games
public int GetPlayerScore(Player player, ReadOnlyCollection<Cell> cellsPlayed, Board b)
public int GetPlayerScore(Player player, ReadOnlyCollection<Cell> cellsPlayed, Board b)
{
if (cellsPlayed.Count == 0)
{
return 0;
}
int score = cellsPlayed.Count;
int cellsX = cellsPlayed[0].GetX;
@ -414,11 +419,15 @@ public int GetPlayerScore(Player player, ReadOnlyCollection<Cell> cellsPlayed, B
{
cellsX = -1;
}
else if (cellsY != cell.GetY && cellsY != -1)
{
cellsY = -1;
}
}
foreach (var cell in cellsPlayed)
{
score += CalculateAdjacentScore(cell, b, cellsPlayed, cellsX, cellsY);
}

Loading…
Cancel
Save