changement mineurs

master
pisouvigne 5 years ago
parent 112539d345
commit 24fd7ab17e

@ -92,6 +92,10 @@ html {
margin-left: 25px;
}
#pseudo_show {
color: var(--cool-color);
}
.listenerHover {
@ -685,3 +689,7 @@ input[type=color] {
animation-play-state: paused;
animation-timing-function: linear;
}
.fa-edit:hover {
color: var(--cool-color);
}

@ -18,7 +18,7 @@
<div id="levelSelectionPage" class="background">
<div id="header_selection" align=center>
<i class="fa fa-arrow-left home" onclick="closeSelection();" aria-hidden="true"></i>
<h1 class="dys" id="title_selection">Mode Selection</h1>
<h1 class="dys txt" id="title_selection"></h1>
<label></label>
</div>
<hr id="hr">
@ -54,7 +54,7 @@
<label>Nombres de portes logiques : </label>
<input type="number" id="colonne_number_setup_global_gen" value="10">
</div><br>
<p class="dys">Colonnes : <a id="colonnes_live"></a></p>
<p class="dys"><a id="colonnes_live"></a></p>
<div>
<p>Fonctions Logiques : </p>
<div>
@ -142,7 +142,7 @@
<div id="firstTimeet" class="modal">
<div class="modal-content info-content">
<div class="modal-body border background" align=center>
<span class="close" onclick="closeModal('firstTimeet');demarrerTimer();">&times;</span>
<span class="close" onclick="closeModal('firstTimeet');">&times;</span>
<h1 class="txt dys" id="infoFirstTimeEt"></h1>
<hr id="hr">
<p class="dys txt margin-global" id="infoFirstTimeEtInfo1"></p>
@ -184,7 +184,7 @@
<div id="firstTimeou" class="modal">
<div class="modal-content info-content">
<div class="modal-body border background" align=center>
<span class="close" onclick="closeModal('firstTimeou');demarrerTimer();">&times;</span>
<span class="close" onclick="closeModal('firstTimeou');">&times;</span>
<h1 class="txt dys" id="infoFirstTimeOu"></h1>
<hr id="hr">
<p class="dys txt margin-global" id="infoFirstTimeOuInfo1"></p>
@ -226,7 +226,7 @@
<div id="firstTimeinv" class="modal">
<div class="modal-content info-content">
<div class="modal-body border background" align=center>
<span class="close" onclick="closeModal('firstTimeinv');demarrerTimer();">&times;</span>
<span class="close" onclick="closeModal('firstTimeinv');">&times;</span>
<h1 class="txt dys" id="infoFirstTimeinv"></h1>
<hr id="hr">
<p class="dys txt margin-global" id="infoFirstTimeinvInfo1"></p>
@ -247,15 +247,15 @@
<br><br>
<p><img src="img/txt_en/not.png" class="margin-right"><img src="img/sym/not.png"></p>
<br><br>
<p class="dys info_check" align=right>Ne plus afficher les aides <a class="txt"
id="close_helps"></a><input type="checkbox" id="info_check_input" onclick="showInfo();"></p>
<p class="dys info_check" align=right>Ne plus afficher les aides</a><input type="checkbox"
id="info_check_input" onclick="showInfo();"></p>
</div>
</div>
</div>
<div id="firstTimenonou" class="modal">
<div class="modal-content info-content">
<div class="modal-body border background" align=center>
<span class="close" onclick="closeModal('firstTimenonou');demarrerTimer();">&times;</span>
<span class="close" onclick="closeModal('firstTimenonou');">&times;</span>
<h1 class="txt dys" id="infoFirstTimenonou"></h1>
<hr id="hr">
<p class="dys txt margin-global" id="infoFirstTimenonouInfo1"></p>
@ -297,7 +297,7 @@
<div id="firstTimeetnon" class="modal">
<div class="modal-content info-content">
<div class="modal-body border background" align=center>
<span class="close" onclick="closeModal('firstTimeetnon');demarrerTimer();">&times;</span>
<span class="close" onclick="closeModal('firstTimeetnon');">&times;</span>
<h1 class="txt dys" id="infoFirstTimeetnon"></h1>
<hr id="hr">
<p class="dys txt margin-global" id="infoFirstTimeetnonInfo1"></p>
@ -391,6 +391,11 @@
<a class="txt dys" id="symbole"></a>
<input id=symcheckbox" type="checkbox" onclick="symbole(this)">
</p>
<p class="dys">
<a>Pseudo : </a>
<a id="pseudo_show"></a>
<i class="fa fa-edit" aria-hidden="true"></i>
</p>
<br>
<br><img onclick="setLang('fr')" class="img_france" src="img/france.png" />
<img onclick="setLang('en')" class="img_usa" src="img/usa.png" /><br><br><br>
@ -615,7 +620,6 @@
<script src="js/db.js"></script>
<script src="js/generateGame.js"></script>
<script>
console.log("wsh");
getTest();
initAll();

@ -16,20 +16,20 @@ const imageLogiqueNonOu = "nor.png";
//line
var colorLineInnactive = "black";
var colorLineActive = "#4CFEFE"; //FFF033
var colorLineActive = "#2ec22e"; //FFF033
const lineStroke = 4;
const pourcentageBreak = 15;
const tension = 0;
//objectif
var colorEnd = "red";
var colorEnd = "#fe8a71";
//switch
const SwitchHeight = 25;
const SwitchWidth = 50;
const colorSwitchBorder = "black";
var colorSwitchInnactiveBackground = "red";
var colorSwitchActiveBackground = "green";
var colorSwitchInnactiveBackground = "#fe8a71";
var colorSwitchActiveBackground = "#2ec22e";
//timer
var timeEnd = 10;

@ -3,7 +3,7 @@ function createEnd() {
//find X and Y
var X = stage.width() - stage.width() / 100 * 5;
var Y = stage.height() / 2;
var Y = stage.height() / 2.5 - 5;
var endShape = new Konva.Rect({
x: X - 25,
@ -257,9 +257,9 @@ function createLink(entre, sortie) {
break;
default:
endLines.push(lineId);
if (end.position === 1) createLine([entre.x + imageWidth, entre.y + imageHeight / 2, sortie.x, (end.y + (50 / (end.position + 1) * (end.let-end.position)))], "line" + lineId, true);
if (end.position === 1) createLine([entre.x + imageWidth, entre.y + imageHeight / 2, sortie.x, (end.y + (50 / (end.position + 1) * (end.let - end.position)))], "line" + lineId, true);
else createLine([entre.x + imageWidth, entre.y + imageHeight / 2, sortie.x, (end.y + (50 / (end.position + 1) * (end.let+1 - end.position)))], "line" + lineId, true);
else createLine([entre.x + imageWidth, entre.y + imageHeight / 2, sortie.x, (end.y + (50 / (end.position + 1) * (end.let + 1 - end.position)))], "line" + lineId, true);
setLine(entre, "id3", "line" + lineId);
end.let--;

File diff suppressed because one or more lines are too long

@ -141,7 +141,7 @@ function calcul(launch) {
col[i]++;
}
}
document.querySelector("#colonnes_live").innerHTML = col + " | nombre de colonne : " + col.length + " | nombre total de portes : " + number_const;
document.querySelector("#colonnes_live").innerHTML = "Nombre de colonnes : " + col.length + " (" + col + ")";
var matchs = [];
var fork = [];
@ -276,7 +276,7 @@ function tuto(niveau) {
numberColonne2 = 0;
numberPerColonne = [numberColonne1, numberColonne2];
liveColonneNumber.push([]);
timeEnd = 20;
timeEnd = 99;
insertLogiqueColonne("logique" + logiqueCount, firstTime[0], 0);
if (allowedInfoPorte) {
openModal('firstTime' + firstTime[0]);
@ -287,9 +287,8 @@ function tuto(niveau) {
createLinkAuto(element.name);
});
initEndGame("tuto");
} else {
}
}
@ -647,6 +646,19 @@ function generate2(col, matchs, fork, portes) {
}
}
initEndGame();
console.log(lines);
console.log(endLines);
var endStateTab = [], v = 0;
endLines.forEach(function (line) {
endStateTab[v] = ["line" + line, getLineState("line" + line)];
v++;
});
endStateTab.forEach(function (element) {
if (element[1] === false) {
console.log("faux : " + element[0])
console.log(getLogiqueFromLine(element[0]));
}
});
invertLine();
checkAllSortieLogique();
}

@ -20,6 +20,7 @@ const lang = {
modeDeJeu: "Mode de jeu",
niveau: "Niveau ",
temps: "Temps : ",
title_selection: "Sélection du mode de jeu",
infoFirstTimeEt: "Porte \"et\"",
infoFirstTimeEtInfo1: "L'opérateur ET renvoie VRAI seulement si ses deux entrées sont à 1.<br><br><br> Voici la table de vérité :",
infoFirstTimeOu: "Porte \"ou\"",
@ -41,6 +42,7 @@ const lang = {
},
en: {
title_selection: "Game Selection",
titleGame: "Make It True",
settingTitle: "Settings",
playSelection: "I want to play ",

@ -1,10 +1,17 @@
function initAll() {
loadData();
darkMode();
setLang("fr");
dysFont();
}
function loadData() {
document.querySelector("#pseudo_show").innerHTML = generateName();
document.querySelector("#active_switch_picker").value = colorSwitchActiveBackground;
document.querySelector("#inactive_switch_setting").value = colorSwitchInnactiveBackground;
}
var mobile = false;
var switchs = [],
lineCount = [],
@ -117,7 +124,7 @@ function initEndGame(mode) {
createEnd();
initEnd();
initTimer();
initTimer(mode);
checkAllSortieLogique();
}

@ -1,5 +1,8 @@
function initTimer() {
function initTimer(mode) {
if (mode === undefined || mode === null || mode !== "tuto")
document.querySelector(".timer_txt").innerHTML = timeEnd - timer.getTimeValues().seconds;
else
document.querySelector(".timer_txt").innerHTML = "∞";
document.querySelector(".progress_bar").style.animationPlayState = 'paused';
}

Loading…
Cancel
Save