correction timer , enlever barre vertical

This commit is contained in:
Bezza Younes 2024-12-05 21:35:50 +01:00
parent 9276325c2c
commit 0b5cc81150
3 changed files with 15 additions and 18 deletions

View file

@ -31,6 +31,7 @@
<button id="debut_game" onclick="chrono()">GO!</button>
<button id="fin_game" onclick="reset()">CIAO</button>
<span class="vertical-line"></span>
</body>
</html>

View file

@ -12,7 +12,6 @@ class Case {
}
}
<<<<<<< HEAD
function sleep(ms){
return new Promise(resolve => setTimeout(resolve, ms));
}
@ -20,16 +19,18 @@ async function chrono(){
let k=document.getElementById("temps").value;
const myButton = document.getElementById("fin_game");
let arret=0;
while(arret==!1) {
await sleep(1000);
document.getElementById("temps").value=document.getElementById("temps").value*1+1;
myButton.addEventListener("click",() =>{arret=1;})
while(arret==!1) {
await sleep(1000);
if (arret==!1){
document.getElementById("temps").value=document.getElementById("temps").value*1+1;
}
}
}
async function reset(){
await sleep(500);
document.getElementById("temps").value=0;
}
@ -42,8 +43,7 @@ function Cookies() {
Cookies();
}
}
Cookies();
=======
//Cookies();
let grille = [];
@ -63,4 +63,3 @@ function creerGrille(haut, larg) {
}
>>>>>>> c1749f127de61663f2681184e2809c5310ee00a5

View file

@ -24,16 +24,13 @@
border-width: 2px;
border-style: double;
width: 49%;
}
.item_nav{
margin-top: 3px;
padding-right: 10px;
}
.vertical-line{
border-left: 4px solid #000;
display: inline-block;
height: 400px;
margin: 0 50% ;
padding-top: 0;
}