correction des objectifs se générant avec la même valeur que le résultat

master
adplantade 5 years ago
parent c2213b0312
commit c96a8c26b7

@ -373,6 +373,10 @@ function generate(){
}
}
empiler(true);
if(checkAllOK(true)==true)
{
generate();
}
toutDessiner(tabObjCmp,canvasO,ctxO);
}
@ -488,7 +492,7 @@ function rotationManager(e)
}
function checkAllOK(){
function checkAllOK(justChecking=false){
//const condition = (val) => val.toString() == element.toString();
var exists=true;
//exists=!tabObjCmp.every(unique);
@ -510,7 +514,7 @@ function checkAllOK(){
exists=false;
}
if(exists)
if(exists && !justChecking)
{
var audio = new Audio('ress/Jewel4.mp3');
audio.play();
@ -519,6 +523,10 @@ function checkAllOK(){
handleScore(1);
generate();
}
else if(justChecking)
{
return exists;
}
}
function handleScore(modif)

Loading…
Cancel
Save