optimized Board.cs

test_old_branch
Jules LASCRET 12 months ago
parent fc83f584c7
commit baed573e04

@ -30,13 +30,11 @@ namespace QwirkleClassLibrary
{ {
for (int i = 0; i < cells.Count; i++) for (int i = 0; i < cells.Count; i++)
{ {
if (this.cells[i].GetX == x && this.cells[i].GetY == y) if (this.cells[i].GetX != x || this.cells[i].GetY != y) continue;
if (cells[i].IsFree == true)
{ {
if (cells[i].IsFree == true) return cells[i].SetTile(tile);
{
return cells[i].SetTile(tile);
}
} }
} }
return false; return false;

Loading…
Cancel
Save