Workshop › Tetris-style Blocks › Step 22 of 32
After game over, Space or Enter starts a new game, and no other key does anything.
```js
if (state === 'over') {
if (event.key === ' ' || event.key === 'Enter') newGame()
return
}
```newGame().return ends the listener there, so the arrows do nothing after the game.Write the four lines as the first lines of the key listener.
Skills: Keyboard and mouse input, Game states
← Game Over on screen Clear full rows →