Workshop › Rhythm Lanes › Step 24 of 35
A perfect is worth 300 points and a good 100. The score is shown at the top left.
```js
let score
score = 0
judged.perfect += 1
score += 300
judged.good += 1
score += 100
ctx.fillStyle = 'white'
ctx.font = 'bold 16px sans-serif'
ctx.textAlign = 'left'
ctx.fillText('Score ' + score, 12, 24)
```score starts at 0 in reset, and each hit adds its points.textAlign = 'left' puts the text's left end at x = 12. 'Score ' + score joins a text and a number.let frame write let score; in reset, under frame = 0, write score = 0.press, write the two score += ... lines under the judged lines.draw, under the if (feedback) block, write the four score lines.Skills: Game states
← Missed notes Hits in a row →