Standard "sapper". The field is 16 by 16 cells. 20 minutes on the field.
When you first press the player obviously misses the cell with a mine. He gets either on an empty cage or on a cage containing information about the number of mines around. Let's call it a cell with a number.
If a player clicks on a cell with a number, we open it only. If a player has clicked on a completely empty cell, then besides this cell itself, it is required to open all (related, I can’t find the translation. Whether they are connected) cells, including those that contain a number, but not further than them. Something like this:
The player clicked on the green dot. Reds contain mines. Yellow contain numbers. Purple displays those cells that should be opened along with green. (Yes, some of the yellow purple marks are not accidental, they should also be open).
Actually, the algorithm of searching for these very purple cells is of interest .
Also, if there are any implementation subtleties regarding JavaScript, I will also be happy to listen.

