public void SetAreaToCell(GridArea area, BaseCell newCell) { var points = area.GetPoints(); foreach (var point in points) { SetCell(point.x, point.y, newCell); } }
public bool IsAreaValid(GridArea area) { var points = area.GetPoints(); for (int i = 0; i < points.Length; i++) { if (!IsValidGridPosition(points[i].x, points[i].y)) { return(false); } } return(true); }
public bool IsAreaEmpty(GridArea area) { return(area.GetPoints().All(p => IsCellEmpty(p.x, p.y))); }