diff --git a/dist/Tetris.ogg b/dist/Tetris.ogg new file mode 100644 index 0000000..ad09004 Binary files /dev/null and b/dist/Tetris.ogg differ diff --git a/dist/tetrion.js b/dist/tetrion.js index 2746630..ac113d9 100644 --- a/dist/tetrion.js +++ b/dist/tetrion.js @@ -1055,6 +1055,8 @@ Tetris.prototype = { _check: function() { var rows = checkFullRows(this.matrix); if (rows.length) { + if(rows.length >= 4) + new Audio('./dist/Tetris.ogg').play(); removeRows(this.matrix, rows); var score = calcScore(rows); var reward = calcRewards(rows); diff --git a/src/main.js b/src/main.js index f571cfc..f00c85a 100644 --- a/src/main.js +++ b/src/main.js @@ -463,6 +463,8 @@ Tetris.prototype = { _check: function() { var rows = checkFullRows(this.matrix); if (rows.length) { + if(rows.length >= 4) + new Audio('./dist/Tetris.ogg').play(); removeRows(this.matrix, rows); var score = calcScore(rows); var reward = calcRewards(rows);