Merge branch 'master' of https://codefirst.iut.uca.fr/git/jeremy.mouyon/sae201_qwirkle
continuous-integration/drone/push Build is passing Details

test_old_branch
Jérémy Mouyon 11 months ago
commit 8b70054950

@ -427,8 +427,17 @@ namespace QwirkleClassLibrary
int dx = adjacentCell.GetX - cell.GetX; int dx = adjacentCell.GetX - cell.GetX;
int dy = adjacentCell.GetY - cell.GetY; int dy = adjacentCell.GetY - cell.GetY;
if (adjacentCell.GetX == cell.GetX)
{
score += CalculateLineScore(cell, dx, 1, b);
}
else
{
score += CalculateLineScore(cell, 1, dy, b);
score += CalculateLineScore(cell, dx, dy, b); }
} }
return score; return score;
@ -438,13 +447,13 @@ namespace QwirkleClassLibrary
{ {
int score = 0; int score = 0;
for (int i = 1; i < b.Rows; i++) for (int i = 1; i < 7; i++)
{ {
var extendedCell = b.GetCell(cell.GetX + i * dx, cell.GetY + i * dy); var extendedCell = b.GetCell(cell.GetX + i * dx, cell.GetY + i * dy);
if (extendedCell?.GetTile == null) if (extendedCell?.GetTile == null)
{ {
break; continue;
} }
score++; score++;

Loading…
Cancel
Save