Skip to content

Commit ab2aa10

Browse files
committed
fix audio
1 parent 80fb1ff commit ab2aa10

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ function arenaSweep() {
7272
arena.unshift(row);
7373
++y;
7474
player.score += rowCount;
75+
clearPlayer.play();
7576
}
7677
}
7778
}
@@ -84,6 +85,7 @@ function collide(arena, player) {
8485
if (mat[y][x] !== 0 &&
8586
(arena[y + pos.y] &&
8687
arena[y + pos.y][x + pos.x]) !== 0) {
88+
8789
return true;
8890
}
8991
}
@@ -309,6 +311,7 @@ function playerDrop() {
309311
if (collide(arena, player)) {
310312
player.pos.y--;
311313
merge(arena, player);
314+
dropPlayer.play();
312315
playerReset();
313316
arenaSweep();
314317
updateScore();

0 commit comments

Comments
 (0)