Workshop › Whack-a-Mole › Step 12 of 18
At the end of a round a dark band across the field shows the result. A click starts a new round (that already works:
any click while not playing calls start).
```js
if (state === 'over') {
ctx.fillStyle = 'rgba(0, 0, 0, 0.6)'
ctx.fillRect(0, 150, canvas.width, 150)
ctx.fillStyle = 'white'
ctx.font = 'bold 30px sans-serif'
ctx.fillText("Time's up!", canvas.width / 2, 190)
ctx.font = '20px sans-serif'
ctx.fillText('Score: ' + score, canvas.width / 2, 225)
ctx.font = '16px sans-serif'
ctx.fillText('Click to play again', canvas.width / 2, 282)
}
```rgba(0, 0, 0, 0.6) is black at 60%, so the field shows faintly through the band."Time's up!" uses double quotes because the text contains an apostrophe.At the end of draw, under the ready block, write the over block.
Skills: Drawing on a canvas