void addChainreaction(int cell, int x, int y, List<Grid.SearchResult> newCubesToExplode, List<Grid.SearchResult> cubesToExplode) { if (x >= 0 && x < width && y >= 0 && y < height) { if (grid.GetCell(x, y) == cell) { if (!alreadyExploded(x, y, cubesToExplode)) { Grid.SearchResult result = new Grid.SearchResult(); result.x = x; result.y = y; newCubesToExplode.Add(result); } } } }
void addChainreaction(int cell, int x, int y, List <Grid.SearchResult> newCubesToExplode, List <Grid.SearchResult> cubesToExplode) { if (x >= 0 && x < width && y >= 0 && y < height) { if (grid.GetCell(x, y) == cell) { if (!alreadyExploded(x, y, cubesToExplode)) { Grid.SearchResult result = new Grid.SearchResult(); result.x = x; result.y = y; newCubesToExplode.Add(result); } } } }