AAAAAAAAAAAAA

This commit is contained in:
JusDeChâtaigne
2023-12-08 07:53:23 +01:00
committed by GitHub
parent c574435e82
commit 8c20fb6eef
4 changed files with 739 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
let score = 0;
function augmenterCompteur() {
score++;
handleScore()
}
function handleScore() {
const total = 25;
const categories_step = 5;
const starsId = [
"star1",
"star2",
"star3",
"star4",
"star5",
]
let starElements = starsId.map(id => document.getElementById(id));
for(let i = 0; i < starElements.length; i++) {
if (score >= (i + 1) * categories_step) {
starElements[i].style.visibility = 'visible';
}
}
if (score === total) window.location.href = './easterEggEtoile.html';
}