|
|
|
@ -232,6 +232,7 @@ function addGenForkInput() {
|
|
|
|
|
|
|
|
|
|
function tuto(niveau) {
|
|
|
|
|
setMode("Tuto");
|
|
|
|
|
isTutoriel = true;
|
|
|
|
|
windowWidth = window.innerWidth;
|
|
|
|
|
windowHeight = window.innerHeight;
|
|
|
|
|
var numberColonne1 = 2;
|
|
|
|
@ -441,11 +442,13 @@ function createGameOne(niveau) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function generate2(col, matchs, fork) {
|
|
|
|
|
function generate2(col, matchs, fork, portes) {
|
|
|
|
|
isTutoriel = false;
|
|
|
|
|
isTuto = false;
|
|
|
|
|
hideDiv(document.querySelector('#TestNouveauGenerateur'));
|
|
|
|
|
showDiv(document.querySelector('#playPage'));
|
|
|
|
|
resetAllTabs(false);
|
|
|
|
|
|
|
|
|
|
if (portes === null || portes === undefined)
|
|
|
|
|
arrayPorte = [
|
|
|
|
|
[document.querySelector("#logique1").checked, "et"],
|
|
|
|
|
[document.querySelector("#logique2").checked, "ou"],
|
|
|
|
@ -453,6 +456,9 @@ function generate2(col, matchs, fork) {
|
|
|
|
|
[document.querySelector("#logique4").checked, "etnon"],
|
|
|
|
|
[document.querySelector("#logique5").checked, "nonou"]
|
|
|
|
|
];
|
|
|
|
|
else arrayPorte = portes;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
arrayPorte = arrayPorte.filter(function (e) {
|
|
|
|
|
if (e[0] === true) return e;
|
|
|
|
@ -461,10 +467,18 @@ function generate2(col, matchs, fork) {
|
|
|
|
|
var numberCol = col.length;
|
|
|
|
|
var numberPerCol = [];
|
|
|
|
|
numberPerColonne = [];
|
|
|
|
|
tempMatchs = [];
|
|
|
|
|
tempFork = [];
|
|
|
|
|
for (let i = 0; i < col.length; i++) {
|
|
|
|
|
numberPerCol[i] = col[i];
|
|
|
|
|
numberPerColonne[i] = col[i];
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < matchs.length; i++)
|
|
|
|
|
tempMatchs[i] = matchs[i];
|
|
|
|
|
for (let i = 0; i < fork.length; i++)
|
|
|
|
|
tempFork[i] = fork[i];
|
|
|
|
|
tempPortes = portes;
|
|
|
|
|
tempCol = numberPerColonne;
|
|
|
|
|
|
|
|
|
|
colonneTot = col.length;
|
|
|
|
|
var compt = new Array();
|
|
|
|
@ -529,7 +543,6 @@ function generate2(col, matchs, fork) {
|
|
|
|
|
if (listeLogiqueObj[x].matchId1 !== null) {
|
|
|
|
|
if (getElementArray(listeLogiqueObj[x].matchId1, listeSame)[1] === null) {
|
|
|
|
|
getElementArray(listeLogiqueObj[x].matchId1, listeSame)[1] = arrayPorte[num2][1];
|
|
|
|
|
console.log(listeLogiqueObj[x].matchId2);
|
|
|
|
|
if (listeLogiqueObj[x].matchId2 !== null && getElementArray(listeLogiqueObj[x].matchId2, listeSame)[1] === null) {
|
|
|
|
|
getElementArray(listeLogiqueObj[x].matchId2, listeSame)[1] = arrayPorte[num2][1];
|
|
|
|
|
}
|
|
|
|
@ -539,7 +552,6 @@ function generate2(col, matchs, fork) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log(listeSame);
|
|
|
|
|
|
|
|
|
|
createStage("play_container");
|
|
|
|
|
stage.add(layer);
|
|
|
|
|