Exemple #1
0
        public void SetAreaToCell(GridArea area, BaseCell newCell)
        {
            var points = area.GetPoints();

            foreach (var point in points)
            {
                SetCell(point.x, point.y, newCell);
            }
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public bool IsAreaEmpty(GridArea area)
 {
     return(area.GetPoints().All(p => IsCellEmpty(p.x, p.y)));
 }