generateur et settings

master
pisouvigne 5 years ago
parent 5668ef8721
commit c1a6c2ab9a

@ -265,6 +265,10 @@
<h1 class="txt dys" id="settingTitle"></h1>
<hr id="hr">
<br>
<p>
<a class="txt dys" id="timerSetting"></a>
<input id="timercheck" type="checkbox" onclick="showBarTimer(this)" checked>
</p>
<p>
<a class="txt dys" id="themeDark"></a>
<input id="darkcheck" type="checkbox" onclick="darkMode()" checked>
@ -504,7 +508,7 @@
<script src="js/db.js"></script>
<script src="js/generateGame.js"></script>
<script>
generateFromBottom();
generate2();
initAll();

@ -10,6 +10,15 @@ function closeModal(modal) {
modal.style.display = "none";
}
function showBarTimer(checkbox) {
if (checkbox.checked == true) {
document.getElementById("progress_bar").style.display = 'block';
}
else {
document.getElementById("progress_bar").style.display = 'none';
}
}
function darkMode() {
var checkbox = document.getElementById("darkcheck");
if (checkbox.checked == true) {

@ -299,6 +299,15 @@ function createGameOne(niveau) {
initEndGame();
}
function generate2() {
var matchs = [[3, 2][2, 2]];
var fork = [[2, 1][1, 1]];
console.log(fork);
}
//a l'epoque
function generateFromBottom() {
var NombrecolonneTest = 2;
var numberPerColonneTest = [3, 2];

@ -33,6 +33,7 @@ const lang = {
successTitle: "Niveau réussi !",
successInfo: "Vous avez réussi en ",
symbole: "Mode symboles",
timerSetting: "Activer la barre timer"
},
en: {

@ -1,5 +1,6 @@
function initTimer() {
document.querySelector(".timer_txt").innerHTML = timeEnd - timer.getTimeValues().seconds;
document.querySelector(".progress_bar").style.animationPlayState = 'paused';
}
function move() {
@ -32,6 +33,7 @@ timer.addEventListener('secondsUpdated', function (e) {
if (timer.getTimeValues().seconds <= timeEnd) {
move();
} else {
timeTot = timeTot + timer.getTimeValues().seconds;
endTime();
timer.stop();
@ -78,4 +80,4 @@ function resetStar() {
document.querySelector("#star3").style.color = document.body.style.color;
document.querySelector("#star4").style.color = document.body.style.color;
document.querySelector("#star5").style.color = document.body.style.color;
}
}

Loading…
Cancel
Save