enhanced score
continuous-integration/drone/push Build is passing Details

test_old_branch
Jules LASCRET 11 months ago
parent b9035a17fa
commit 450c2095aa

@ -429,7 +429,16 @@ namespace QwirkleClassLibrary
int dx = adjacentCell.GetX - cell.GetX;
int dy = adjacentCell.GetY - cell.GetY;
score += CalculateLineScore(cell, dx, dy, b);
if (adjacentCell.GetX == cell.GetX)
{
score += CalculateLineScore(cell, dx, 1, b);
}
else
{
score += CalculateLineScore(cell, 1, dy, b);
}
}
return score;
@ -439,13 +448,13 @@ namespace QwirkleClassLibrary
{
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);
if (extendedCell?.GetTile == null)
{
break;
continue;
}
score++;

Loading…
Cancel
Save