Workshop › Pool › Step 15 of 33
The goal will be to clear the table in as few shots as possible, so we count them and show the count above the table.
```js
let shots
shots = 0
shots += 1
ctx.fillStyle = 'white'
ctx.font = 'bold 16px sans-serif'
ctx.textAlign = 'left'
ctx.fillText('Shots ' + shots, LEFT, 22)
```shots is 0 after reset and goes up by one in shoot, only when a shot really happens.let power write let shots; in reset, under power = 8, write shots = 0.shoot, write shots += 1 above state = 'rolling'.draw, after the ball loop, leave an empty line and write the four text lines.Skills: Game states, Drawing on a canvas
← Hide the aim while rolling Balls that touch →