diff --git a/Celebration.mp3 b/Celebration.mp3 new file mode 100644 index 0000000..2588fd7 Binary files /dev/null and b/Celebration.mp3 differ diff --git a/script.js b/script.js index 759fb57..0e9d605 100644 --- a/script.js +++ b/script.js @@ -239,9 +239,18 @@ function shakeTiles(tiles) { ) }) } +// The CELEBRATION SOUND EFFECT +function playCelebrationSound() { + const audio = new Audio('celebration.mp3') + audio.volume = 0.5 // Adjust volume as needed + audio.play().catch(error => { + console.error('Error playing celebration sound:', error) + }) +} // IT'S RIGHT HERE YOU BLIND MOFO" function checkWinLose(guess, tiles) { if (guess === targetWord) { + playCelebrationSound() showAlert("Congratulations, You win!", 5000) danceTiles(tiles) celebrateWithConfetti()