Try of getPlayerScore
continuous-integration/drone/push Build is passing Details

test_old_branch
Jules LASCRET 11 months ago
parent 8b70054950
commit 3aa52e3ae7

@ -387,6 +387,8 @@ namespace QwirkleClassLibrary
return surroundingCells.Any(cell => cell?.GetTile != null); return surroundingCells.Any(cell => cell?.GetTile != null);
} }
public int GetPlayerScore(Player player, ReadOnlyCollection<Cell> cellsPlayed, Board b) public int GetPlayerScore(Player player, ReadOnlyCollection<Cell> cellsPlayed, Board b)
{ {
@ -430,12 +432,12 @@ namespace QwirkleClassLibrary
if (adjacentCell.GetX == cell.GetX) if (adjacentCell.GetX == cell.GetX)
{ {
score += CalculateLineScore(cell, dx, 1, b); score += CalculateLineScore(cell, 0, dy, b);
} }
else else if (adjacentCell.GetY == cell.GetY)
{ {
score += CalculateLineScore(cell, 1, dy, b); score += CalculateLineScore(cell, dx, 0, b);
} }
} }

Loading…
Cancel
Save