From b78e30dedc602f2ea0d4c8858d1a63c4a1c430cc Mon Sep 17 00:00:00 2001 From: sundowndev Date: Sat, 9 Dec 2017 04:29:13 +0100 Subject: [PATCH] update js --- assets/js/script.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/js/script.js b/assets/js/script.js index a9b9d03..bd9fad2 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -133,6 +133,8 @@ setInterval(function(){ bulletY = 0; setTimeout(function(){ bulletDestination.classList.remove('cible-touchee'); + bulletDestination.style.background = ''; + bulletDestination.style.backgroundPosition = ''; }, 1000); return; } @@ -212,8 +214,9 @@ var ntm = setInterval(function(){ emplacement = document.querySelector(".line-"+ciblex+" .col-"+cibley); emplacement.classList.add('cible'); cibleValue = cibleValue + 1; - if (cibleValue>=3){ - alert("TAS PERDU"); + if (cibleValue>=4){ + // game over + console.log("TAS PERDU"); clearInterval(ntm); } }, 1000);