# C# Minesweeper - When cells with no mines nearby gets clicked

I'm currently making a Minesweeper in C#. I've already done the basics (generating minefield, rules and ui) but I don't know how I should implement when the user clicks a cell and the cell has no mines nearby and clicks nearby cells with also no mines nearby, like this:

And after click

This is my current code on this:

if (MineField(x,y) == false) // If the clicked cell isn't a mine
{
if (GetNeighbours(x,y) == 0) // GetNeighbours returns the amount of mines in the closest 8 cells
{
// To be honest, no idea...
}
}

• Simply the amount of mines in the neighbor tiles is not enough, you need to return an array of the tile references / coordinates, so you can call your Click() methods, or whatever you want to happen if the neighbor tiles are empty. – Zee Oct 9 '16 at 11:27