public void NewGrid() { GridSquare[,] temp = new GridSquare[Width, Height]; ShadowGridSquares = new GridSquare[Width, Height]; for (int y = 0; y < temp.GetLength(1); y++) { for (int x = 0; x < temp.GetLength(0); x++) { if (x < GridSquares.GetLength(0) && y < GridSquares.GetLength(1) && GridSquares != null && GridSquares[x, y] != null) { temp[x, y] = GridSquares[x, y]; ShadowGridSquares[x, y] = new GridSquare(); } else { temp[x, y] = new GridSquare(); ShadowGridSquares[x, y] = new GridSquare(); } } } GridSquares = temp; }