diff --git a/app.js b/app.js index 3087292..772d689 100644 --- a/app.js +++ b/app.js @@ -69,7 +69,7 @@ async function jeu(){ game.inGame = true //game.mise = parseInt(document.getElementById("mise_input").value) - if(game.mise > 100 || game.mise < 0 || game.mise > game.joueur){ + if(game.mise > 100 || game.mise <= 0 || game.mise > game.joueur){ console.log("erreur: pas possible jouer") game.inGame = false return @@ -99,6 +99,7 @@ function gain(tirage){ if(tirage[0] == 9 && tirage[1] == 9 && tirage[2] == 9){ + let periode = setInterval(clignotement, 800); return game.bac } else if(tirage[0] == tirage[1] && @@ -113,7 +114,7 @@ function gain(tirage){ return 0 } function regles(){ - let overlay = document.getElementById("overlay-rules") + let overlay = document.getElementsByClassName("overlay")[0]; if(overlay.style.display == "none") overlay.style.display = "flex" else overlay.style.display = "none" } @@ -135,3 +136,23 @@ for (let i = 0; i < 10; i++) { } } + +let jackpot_loop = 0; + +function clignotement(){ + if (jackpot_loop<10){ + if (document.getElementById('jackpot').style.visibility=='visible'){ + document.getElementById('jackpot').style.visibility='hidden'; + } + else{ + document.getElementById('jackpot').style.visibility='visible'; + } + } + else { + clearInterval(periode); + jackpot_loop = 0; + } + jackpot_loop++; +}; +// mise en place de l appel de la fonction toutes les 0.8 secondes +// Pour arrêter le clignotement : clearInterval(periode); diff --git a/index.html b/index.html index f1f5ab3..d6c5c48 100644 --- a/index.html +++ b/index.html @@ -3,67 +3,86 @@ - Document + Bellagio - tirette - -
-
-
0
-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
+

CASINO BELLAGIO

+
+ +
-
-
-
-
-
0
-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
+
+ Banque : 1000 +
+ tirette + +
+
+
0
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
-
+
+
+
+
+
0
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
+
+
+
+
0
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
+
+ +
-
-
-
0
-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
- -
-
- - + Vous : +
-

Banque : 1000

-

Vous :

-