public List <Cell <int> > getEmptyCellInSquare(int _x, int _y) { int minX = Square.getMinX(_x, PuzzleOrder); int maxX = Square.getMaxX(_x, PuzzleOrder); int minY = Square.getMinX(_y, PuzzleOrder); int maxY = Square.getMaxX(_y, PuzzleOrder); return(PlayGrid.FindAll(cell => cell.X >= minX && cell.X <= maxX && cell.Y >= minY && cell.Y <= maxY && cell.Value == Int32.MinValue)); }
public List <int> getPlacedValueInSquare(int _x, int _y) { int minX = Square.getMinX(_x, PuzzleOrder); int maxX = Square.getMaxX(_x, PuzzleOrder); int minY = Square.getMinX(_y, PuzzleOrder); int maxY = Square.getMaxX(_y, PuzzleOrder); var cellsOfSquare = PlayGrid.FindAll(cell => cell.X >= minX && cell.X <= maxX && cell.Y >= minY && cell.Y <= maxY && cell.Value != Int32.MinValue); return(cellsOfSquare.Select(cell => cell.Value).ToList()); }