Skip to content

Commit 1cb43a6

Browse files
committed
fix; reset powerups
1 parent 5725c25 commit 1cb43a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

075-breakout game/script.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ function setupLevel(levelIndex) {
321321
ball.speed = level.ballSpeed;
322322
ball.dx = level.ballSpeed;
323323
ball.dy = -level.ballSpeed;
324+
// Clear existing power-ups
325+
powerUps.length = 0;
324326
// Reset paddle
325327
paddle.x = canvas.width / 2 - config.paddleWidth / 2;
326328
paddle.y = canvas.height - config.paddleHeight - 10;

0 commit comments

Comments
 (0)