Workshop › Tetris-style Blocks › Step 27 of 32
Each level makes the pieces fall 70 ms sooner, but never faster than every 100 ms.
```js
function dropInterval() {
return Math.max(100, 800 - (level() - 1) * 70)
}
if (state === 'playing' && time - lastDrop >= dropInterval()) {
```800 - (level() - 1) * 70 is 800 at level 1 and 70 less for each level after.Math.max(100, ...) picks the bigger number, so the wait never goes below 100 ms.dropInterval() instead of using 800.dropInterval above function clearLines() { (under level).loop, replace 800 with dropInterval().Skills: The game loop
← Levels A fair bag of pieces →