Workshop › Minesweeper › Step 17 of 26
A flagged cell cannot be opened by a click, and the flood fill steps around it. One misclick near the end would otherwise ruin a long game.
```js
function reveal(start) {
if (start.revealed || start.flagged) return
if (cell.revealed || cell.flagged) continue
```reveal returns at once for a flagged cell.Add || start.flagged to the first line of reveal, and || cell.flagged to the continue line of the flood.
Skills: Game states
← Flags with the right button Draw the flags →