Workshop › Rhythm Lanes › Step 27 of 35
When the last note has gone by, the song is over. state is 'playing' during the song and becomes 'done' a second
after the last row.
```js
let state // 'playing' or 'done'
state = 'playing'
if (frame > LEAD + CHART.length * STEP + 60) {
state = 'done'
}
```CHART.length is the number of rows (48). The last row's time is about LEAD + CHART.length * STEP; 60 frames
more is a second of silence.state becomes 'done'.let lit write let state; at the end of reset, write state = 'playing'.update, under the miss loop, write the if block.Skills: Game states
← The multiplier Stop the clock →