diff --git a/site/vue/index.html b/site/vue/index.html index 1be7a5f..06e9820 100644 --- a/site/vue/index.html +++ b/site/vue/index.html @@ -234,7 +234,7 @@
- +
diff --git a/site/vue/js/const.js b/site/vue/js/const.js index f039f03..b81ddba 100644 --- a/site/vue/js/const.js +++ b/site/vue/js/const.js @@ -21,6 +21,9 @@ const lineStroke = 4; const pourcentageBreak = 15; const tension = 0; +//objectif +var colorEnd = "red"; + //switch const SwitchHeight = 25; const SwitchWidth = 50; diff --git a/site/vue/js/createElement.js b/site/vue/js/createElement.js index d906883..d153b8b 100644 --- a/site/vue/js/createElement.js +++ b/site/vue/js/createElement.js @@ -10,7 +10,7 @@ function createEnd() { y: Y, sides: 6, radius: 30, - fill: '#9a9a9a', + fill: colorEnd, stroke: 'black', strokeWidth: 4, id: "end", @@ -317,19 +317,20 @@ function createLinkAuto(logiqueId) { } }); createLink(findLogique(logiqueId), logiqueMatch); - if (double) { + if (double && logiqueMatch.type != "inv") { var distance2 = logique.y * 1500; var logique2 = null; ligneSup.splice(ligneSup.indexOf(logiqueMatch), 1); ligneSup.forEach(function (element) { - if (Math.abs(logique.y - element.y) < distance2) { - + if (Math.abs(logique.y - element.y) < distance2 && element.type != "inv") { distance2 = Math.abs(findLogique(logiqueId).y - element.y); logique2 = element; } }); - createLink(findLogique(logiqueId), logique2); - double = false; + if (logique2 != null) { + createLink(findLogique(logiqueId), logique2); + double = false; + } } } } diff --git a/site/vue/js/func.js b/site/vue/js/func.js index 0201349..da02de8 100644 --- a/site/vue/js/func.js +++ b/site/vue/js/func.js @@ -497,6 +497,7 @@ function changeAllSwitchColorActive(color) { layer.draw(); } function changeEndColorInActive(color) { + colorEnd = color; stage.findOne("#end").fill(color); layer.draw(); } diff --git a/site/vue/js/init.js b/site/vue/js/init.js index cc634ef..d7095dd 100644 --- a/site/vue/js/init.js +++ b/site/vue/js/init.js @@ -18,6 +18,8 @@ function initAllSwitch() { //faire le random de l'inversion de switch if (getRandomArbitrary(0, 3) == 1) { activeSwitch(switche.id()); + //if (checkIfEnd()) + //activeSwitch(switche.id()); } }); diff --git a/site/vue/js/lang.js b/site/vue/js/lang.js index 404516b..773020c 100644 --- a/site/vue/js/lang.js +++ b/site/vue/js/lang.js @@ -11,8 +11,8 @@ const lang = { setting_title_perso: "Personnalisation du jeu", active_line_setting: "Couleur lignes actives", inactive_line_setting: "Couleur lignes inactives", - active_switch_setting: "Couleur intérupteur actif", - inactive_switch_setting: "Couleur intérupteur inactif", + active_switch_setting: "Couleur interrupteur actif", + inactive_switch_setting: "Couleur interrupteur inactif", scoreTitle: "Tableau des scores", infoTitle: "Comment jouer ?", gameOverTitle: "Perdu", @@ -26,7 +26,7 @@ const lang = { infoFirstTimeOuInfo1: "L'opérateur OU renvoie VRAI si au moins une entrés est à 1.


Voici la table de vérité :", infoFirstTimeinv: "Porte \"non\"", infoFirstTimeinvInfo1: "La sortie est l'inverse de l'entrée.


Voici la table de vérité :", - cache_reinit: "Réinitialiser toutes les données en caches", + cache_reinit: "Réinitialiser toutes les données du navigateur", reset_cache_message: "Toutes les données ont été supprimées.


La page va automatiquement se rafraichir dans 3s ...", reset: "Reset", close_helps: "Ne plus afficher les aides", diff --git a/site/vue/js/main.js b/site/vue/js/main.js index 9be07f9..67bda6a 100644 --- a/site/vue/js/main.js +++ b/site/vue/js/main.js @@ -138,9 +138,10 @@ function createGameOne(niveau) { timeEnd = 20; break; case 9: - numberColonne1 = 2; - numberColonne2 = 3; + numberColonne1 = 7; + numberColonne2 = 4; isNotAllowed = true; + isOuAllowed = true; double = true; timeEnd = 5000; break; @@ -174,8 +175,8 @@ function createGameOne(niveau) { isTuto = false; createStage("play_container"); stage.add(layer); - colonneTot = 2; - numberPerColonne = [numberColonne1, numberColonne2]; + colonneTot = 3; + numberPerColonne = [numberColonne1, numberColonne2, 2]; var logiqueCount = 0; if (firstTime.length > 0) {