|
|
@ -19,6 +19,7 @@ var allModeEngl = ["Point Match", "Timer mode", "Infini", "Bac"]; // Défini tou
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var modelangue = false;
|
|
|
|
var modelangue = false;
|
|
|
|
|
|
|
|
var offreSWISH = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var lesPoints = 0; //Points du Joueur1
|
|
|
|
var lesPoints = 0; //Points du Joueur1
|
|
|
@ -974,6 +975,8 @@ function rechargerGAME() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function redistribuerPlateau() {
|
|
|
|
function redistribuerPlateau() {
|
|
|
|
|
|
|
|
lesPoints -= 5;
|
|
|
|
|
|
|
|
document.getElementById("affPoints").textContent = 'Score : ' + lesPoints;
|
|
|
|
if (selectionMode == 0) {
|
|
|
|
if (selectionMode == 0) {
|
|
|
|
redistribuer();
|
|
|
|
redistribuer();
|
|
|
|
} else if (selectionMode == 1 || selectionMode == 2) {
|
|
|
|
} else if (selectionMode == 1 || selectionMode == 2) {
|
|
|
@ -1745,6 +1748,9 @@ function chercherCombinaison() {
|
|
|
|
|
|
|
|
|
|
|
|
function testPertinent() {
|
|
|
|
function testPertinent() {
|
|
|
|
//test();
|
|
|
|
//test();
|
|
|
|
|
|
|
|
offreSWISH = true;
|
|
|
|
|
|
|
|
lesPoints -= 5;
|
|
|
|
|
|
|
|
document.getElementById("affPoints").textContent = 'Score : ' + lesPoints;
|
|
|
|
var allComb = 0;
|
|
|
|
var allComb = 0;
|
|
|
|
//window.alert("Voici ce que j'ai trouvé, mais voulez vous booster mes recherches ?")
|
|
|
|
//window.alert("Voici ce que j'ai trouvé, mais voulez vous booster mes recherches ?")
|
|
|
|
console.log("===============!!!! BOOST !!!!=============")
|
|
|
|
console.log("===============!!!! BOOST !!!!=============")
|
|
|
@ -1760,7 +1766,12 @@ function testPertinent() {
|
|
|
|
//console.log("J'ai tout les ensembles pour " + i + " cartes " + tabCheck.length)
|
|
|
|
//console.log("J'ai tout les ensembles pour " + i + " cartes " + tabCheck.length)
|
|
|
|
var tabInte = comparaisonEmpilement(tabCheck, 0);
|
|
|
|
var tabInte = comparaisonEmpilement(tabCheck, 0);
|
|
|
|
//console.log("nouveau tableau avec " + tabInte.length)
|
|
|
|
//console.log("nouveau tableau avec " + tabInte.length)
|
|
|
|
allComb += testAllEnsemble(tabInte);
|
|
|
|
var comb = 0;
|
|
|
|
|
|
|
|
comb = testAllEnsemble(tabInte);
|
|
|
|
|
|
|
|
if (comb > 0 && i >= 3) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
allComb += comb;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log("nb combi : " + allComb)
|
|
|
|
console.log("nb combi : " + allComb)
|
|
|
|
window.alert("Et voilà ! J'ai finis !")
|
|
|
|
window.alert("Et voilà ! J'ai finis !")
|
|
|
@ -2281,7 +2292,11 @@ function testPourJeuInfini() {
|
|
|
|
for (var i = 0; i < tab.length; i++) {
|
|
|
|
for (var i = 0; i < tab.length; i++) {
|
|
|
|
if (tab[i].code == carteselect.length) {
|
|
|
|
if (tab[i].code == carteselect.length) {
|
|
|
|
solution = false;
|
|
|
|
solution = false;
|
|
|
|
lesPoints += carteselect.length;
|
|
|
|
if (offreSWISH) {
|
|
|
|
|
|
|
|
offreSWISH = false;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
lesPoints += carteselect.length;
|
|
|
|
|
|
|
|
}
|
|
|
|
document.getElementById("affPoints").textContent = 'Score : ' + lesPoints;
|
|
|
|
document.getElementById("affPoints").textContent = 'Score : ' + lesPoints;
|
|
|
|
if (selectionDiemension == 2) {
|
|
|
|
if (selectionDiemension == 2) {
|
|
|
|
changerlesCartes3_2();
|
|
|
|
changerlesCartes3_2();
|
|
|
@ -2354,7 +2369,11 @@ function testPourJeuClassique() {
|
|
|
|
if (tab[i].code == carteselect.length) {
|
|
|
|
if (tab[i].code == carteselect.length) {
|
|
|
|
solution = false;
|
|
|
|
solution = false;
|
|
|
|
cpt = cpt + 20 * copie.length;
|
|
|
|
cpt = cpt + 20 * copie.length;
|
|
|
|
lesPoints += carteselect.length;
|
|
|
|
if (offreSWISH) {
|
|
|
|
|
|
|
|
offreSWISH = false;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
lesPoints += carteselect.length;
|
|
|
|
|
|
|
|
}
|
|
|
|
document.getElementById("affPoints").textContent = 'Score : ' + lesPoints;
|
|
|
|
document.getElementById("affPoints").textContent = 'Score : ' + lesPoints;
|
|
|
|
changerlesCartesDeTasDeJeu();
|
|
|
|
changerlesCartesDeTasDeJeu();
|
|
|
|
}
|
|
|
|
}
|
|
|
|