Workshop › Typing Rain › Step 19 of 33
After three landed words the game is over. state says whether it is 'playing' or 'over'; gameOver() switches it.
```js
let state // 'playing' or 'over'
state = 'playing'
function gameOver() {
state = 'over'
}
lives -= landed.length
if (lives <= 0) {
lives = 0
gameOver()
}
```'playing'.let spawnTimer write let state; at the end of reset, write state = 'playing'.function update() { write gameOver, with an empty line after it.update, under lives -= ..., write the if block.Skills: Game states