diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5ab4d1c Binary files /dev/null and b/.DS_Store differ diff --git a/assets/.DS_Store b/assets/.DS_Store new file mode 100644 index 0000000..d8421c7 Binary files /dev/null and b/assets/.DS_Store differ diff --git a/assets/bg_music/1.mp3 b/assets/bg_music/1.mp3 new file mode 100644 index 0000000..8288b6b Binary files /dev/null and b/assets/bg_music/1.mp3 differ diff --git a/assets/bg_music/2.mp3 b/assets/bg_music/2.mp3 new file mode 100644 index 0000000..8db2d80 Binary files /dev/null and b/assets/bg_music/2.mp3 differ diff --git a/assets/bg_music/3.mp3 b/assets/bg_music/3.mp3 new file mode 100644 index 0000000..6cfb569 Binary files /dev/null and b/assets/bg_music/3.mp3 differ diff --git a/assets/bg_music/4.mp3 b/assets/bg_music/4.mp3 new file mode 100644 index 0000000..ea76580 Binary files /dev/null and b/assets/bg_music/4.mp3 differ diff --git a/assets/bg_music/5.mp3 b/assets/bg_music/5.mp3 new file mode 100644 index 0000000..f1c0294 Binary files /dev/null and b/assets/bg_music/5.mp3 differ diff --git a/assets/bg_music/6.mp3 b/assets/bg_music/6.mp3 new file mode 100644 index 0000000..4c5e63b Binary files /dev/null and b/assets/bg_music/6.mp3 differ diff --git a/index.js b/index.js new file mode 100644 index 0000000..7607a19 --- /dev/null +++ b/index.js @@ -0,0 +1,17 @@ +const scores = [ + { date: "2024-01-06", score: 80 }, + { date: "2024-01-05", score: 75 }, + // Add more scores as needed +]; + +// Function to display score history +function displayScoreHistory() { + const scoreList = document.getElementById("score-list"); + scoreList.innerHTML = ""; // Clear existing list + + scores.forEach((entry) => { + const listItem = document.createElement("li"); + listItem.textContent = `Date: ${entry.date}, Score: ${entry.score}%`; + scoreList.appendChild(listItem); + }); +} diff --git a/music.js b/music.js new file mode 100644 index 0000000..a0d8443 --- /dev/null +++ b/music.js @@ -0,0 +1,19 @@ +let index = Math.floor(Math.random() * 5) + 1; +let bgMusic = new Audio(`/assets/bg_music/${index}.mp3`); + +function changeMusic() { + bgMusic.src = `/assets/bg_music${index}.mp3`; + if (index <= 5) { + index += 1; + } else { + index = 1; + } +} + +window.addEventListener("load", () => { + bgMusic.play(); +}); + +bgMusic.addEventListener("ended", () => { + changeMusic(); +});