private void FlipAdjacentCells(int row, int col) { if (CheckBounds(row + 1, col)) { CellFlipped.Raise(this, new CellEventArgs(row + 1, col)); } if (CheckBounds(row - 1, col)) { CellFlipped.Raise(this, new CellEventArgs(row - 1, col)); } if (CheckBounds(row, col + 1)) { CellFlipped.Raise(this, new CellEventArgs(row, col + 1)); } if (CheckBounds(row, col - 1)) { CellFlipped.Raise(this, new CellEventArgs(row, col - 1)); } }
public void FlipCell(int row, int col) { CellFlipped.Raise(this, new CellEventArgs(row, col)); FlipAdjacentCells(row, col); }