Workshop › Minesweeper › Step 14 of 26
An open mine is drawn on a light red square with a 💣, so after a loss you can see where every mine was.
```js
ctx.fillStyle = cell.mine ? '#fca5a5' : '#e2e8f0'
ctx.fillRect(x + 1, y + 1, CELL - 2, CELL - 2)
if (cell.mine) ctx.fillText('💣', x + CELL / 2, y + CELL / 2 + 1)
else if (cell.count > 0) {
```cell.mine ? a : b picks light red for a mine, light grey otherwise.else if shows the number only when it is not a mine.In the if (cell.revealed) block, change the colour line, add the bomb line, and put else in front of
if (cell.count > 0).
Skills: Drawing on a canvas
← Stepping on a mine Flood fill →