Skip to content

Commit

Permalink
logo added
Browse files Browse the repository at this point in the history
  • Loading branch information
hars-21 committed Jan 28, 2024
1 parent cde6cbe commit 48d06ba
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added assets/.DS_Store
Binary file not shown.
Binary file added assets/bg_music/1.mp3
Binary file not shown.
Binary file added assets/bg_music/2.mp3
Binary file not shown.
Binary file added assets/bg_music/3.mp3
Binary file not shown.
Binary file added assets/bg_music/4.mp3
Binary file not shown.
Binary file added assets/bg_music/5.mp3
Binary file not shown.
Binary file added assets/bg_music/6.mp3
Binary file not shown.
17 changes: 17 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -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);
});
}
19 changes: 19 additions & 0 deletions music.js
Original file line number Diff line number Diff line change
@@ -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();
});

0 comments on commit 48d06ba

Please sign in to comment.