diff --git a/site/vue/difficulty.txt b/site/vue/difficulty.txt new file mode 100644 index 0000000..3f45ed9 --- /dev/null +++ b/site/vue/difficulty.txt @@ -0,0 +1,5 @@ +Niveau 1 : 3 porte "et" +Niveau 2-5 : 2 porte "et" 1 porte "ou" / 2 porte "ou" 1 porte "et" +Niveau 6-10 : 4/5 porte "et" et "ou" +Niveau 11-20 : 4/5 porte "et" "ou" "non-ou" "non-et" "non" ... +Avec temps qui diminu en permanence diff --git a/site/vue/jeu.html b/site/vue/jeu.html deleted file mode 100644 index a3d8bee..0000000 --- a/site/vue/jeu.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - - - - - Make It True - - - - - - - -
-

Niveau 0

-
- Temps : - 0 m 0 s - 20 -
-
-
-
- Click - - - - \ No newline at end of file diff --git a/site/vue/js/timer.js b/site/vue/js/timer.js index 4b0b1a0..c426597 100644 --- a/site/vue/js/timer.js +++ b/site/vue/js/timer.js @@ -27,21 +27,43 @@ timer.addEventListener('secondsUpdated', function (e) { }); function endTime() { if(!isTuto){ - document.querySelector("#mainPage").style.display = 'block'; + closeGame(); var score = (niveauActuel * (50 / timeTot)).toFixed(2); - document.querySelector("#playPage").style.display = 'none'; document.querySelector("#scoreTotGameOver").innerHTML = score; document.querySelector("#niveauGameOver").innerHTML = niveauActuel; document.querySelector("#TempsTotGameOver").innerHTML = timeTot; //calcul stars + resetStar(); if(score < 10){ document.querySelector("#star1").style.color = "#fe8a71"; }else if(score > 10 || score < 50){ + document.querySelector("#star1").style.color = "#fe8a71"; document.querySelector("#star2").style.color = "#fe8a71"; - }else if(score > 10 || score < 50){ + }else if(score > 50 || score < 200){ + document.querySelector("#star1").style.color = "#fe8a71"; document.querySelector("#star2").style.color = "#fe8a71"; + document.querySelector("#star3").style.color = "#fe8a71"; } - openModal('gameOver'); + else if(score > 200 || score < 400){ + document.querySelector("#star1").style.color = "#fe8a71"; + document.querySelector("#star2").style.color = "#fe8a71"; + document.querySelector("#star3").style.color = "#fe8a71"; + document.querySelector("#star4").style.color = "#fe8a71"; + }else{ + document.querySelector("#star1").style.color = "#fe8a71"; + document.querySelector("#star2").style.color = "#fe8a71"; + document.querySelector("#star3").style.color = "#fe8a71"; + document.querySelector("#star4").style.color = "#fe8a71"; + document.querySelector("#star5").style.color = "#fe8a71"; } - + openModal('gameOver'); + } +} + +function resetStar(){ + document.querySelector("#star1").style.color = document.body.style.color; + document.querySelector("#star2").style.color = document.body.style.color; + document.querySelector("#star3").style.color = document.body.style.color; + document.querySelector("#star4").style.color = document.body.style.color; + document.querySelector("#star5").style.color = document.body.style.color; } \ No newline at end of file