|
|
|
@ -503,10 +503,6 @@ function chercheCombi2() {
|
|
|
|
|
|
|
|
|
|
tab = AssemblageARBRE(copieListeDeCarte(DeckTeste), copieCarte(DeckTeste[0]));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//window.alert(DeckTeste[(j + i) + 1].getIdentifiant);
|
|
|
|
|
//window.alert("Combinaison : " + DeckTeste[i].getIdentifiant + DeckTeste[(j + i) + 1].getIdentifiant); //+1 au niveau des identifiants
|
|
|
|
|
//Pb DeckTeste[j + i + 1] marche pas
|
|
|
|
|
var solution = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -514,24 +510,22 @@ function chercheCombi2() {
|
|
|
|
|
tabCode.push(tab[h].code);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//window.alert(tabCode);
|
|
|
|
|
for (var g = 0; g < tab.length; g++) {
|
|
|
|
|
if (tab[g].code == carteselect.length) {
|
|
|
|
|
if (tab[g].code == DeckTeste.length) {
|
|
|
|
|
solution = false;
|
|
|
|
|
//window.alert("yo mec");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!solution) {
|
|
|
|
|
Cptsolution++;
|
|
|
|
|
//window.alert("Nb Solution: " + Cptsolution);
|
|
|
|
|
window.alert("Combinaison a 2 trouvé: " + (i+1) + " " + (i + j + 2));
|
|
|
|
|
}
|
|
|
|
|
//window.alert("i= "+i+"j="+j);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
window.alert("yo mec");
|
|
|
|
|
window.alert("Nombre de solution à 2 cartes : ", Cptsolution);
|
|
|
|
|
window.alert("Nombre de solution à 2 cartes : " + Cptsolution);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
|
//FONCTION DE TEST => permet de tester des fonctionnalité via le bouton VALIDER
|
|
|
|
|
|
|
|
|
|