From d92ce80554e29e2727c0b39d634b8be7915fc10b Mon Sep 17 00:00:00 2001 From: Bocquel Raphael Date: Thu, 21 Nov 2024 11:33:35 +0100 Subject: [PATCH 1/7] Debut du code 11:34:48 up 2:01, 1 user, load average: 0,14, 0,35, 0,38 UTIL. TTY DE LOGIN@ IDLE JCPU PCPU QUOI bocquel tty7 :0 09:33 2:01m 1:14 0.65s mate-session --- demineur.js~ | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 demineur.js~ diff --git a/demineur.js~ b/demineur.js~ new file mode 100644 index 0000000..e69de29 From 9789029b81ffa37df7e858dacdcb88d0077c30ac Mon Sep 17 00:00:00 2001 From: Bocquel Raphael Date: Thu, 21 Nov 2024 11:38:54 +0100 Subject: [PATCH 2/7] =?UTF-8?q?vrai=20d=C3=A9but=20du=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demineur.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/demineur.js b/demineur.js index e69de29..2c431da 100644 --- a/demineur.js +++ b/demineur.js @@ -0,0 +1,9 @@ +class Case { + constructor(x, y) { + this.posX = x; + this.posy = y; + this.isMine = false; + this.number = 0; + } + +} From 73ab258f911034147ce23ee5f2ef8c8137029f15 Mon Sep 17 00:00:00 2001 From: Bezza Younes Date: Thu, 21 Nov 2024 11:40:23 +0100 Subject: [PATCH 3/7] j'ai supp l'autre fichier js --- demineur.js~ | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 demineur.js~ diff --git a/demineur.js~ b/demineur.js~ deleted file mode 100644 index e69de29..0000000 From 666e1d8467844a99c51783eed456d07d23d38965 Mon Sep 17 00:00:00 2001 From: Bezza Younes Date: Fri, 29 Nov 2024 08:55:38 +0100 Subject: [PATCH 4/7] modif de la nav bar --- demineur.html | 21 +++++++++++++++++---- style.css | 30 ++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/demineur.html b/demineur.html index ad93e87..ac25e47 100644 --- a/demineur.html +++ b/demineur.html @@ -4,15 +4,28 @@ Démineur + - -
+ + -
+ +
ICI se retourve le jeu
+ + + \ No newline at end of file diff --git a/style.css b/style.css index e69de29..4375b34 100644 --- a/style.css +++ b/style.css @@ -0,0 +1,30 @@ +#nav_demineur{ + width: 100%; + background-position:0cm; + background-color: #2bd7d484; + border-width: 2px; + border-style: double; + height: 25px; + display: flex; + justify-content:flex-start; + +} + +#body_demineur{ + background-color: rgba(128, 128, 128, 0.544); + + margin: 0; + +} + +#jeu{ + display: flex; + justify-content: center; + /* border-width: 2px; + border-style: double; */ +} + +.item_nav{ + margin-top: 3px; + padding-right: 10px; +} \ No newline at end of file From c1749f127de61663f2681184e2809c5310ee00a5 Mon Sep 17 00:00:00 2001 From: Bocquel Raphael Date: Fri, 29 Nov 2024 08:59:08 +0100 Subject: [PATCH 5/7] Ajout d'images --- case_deux.png | Bin 0 -> 389 bytes case_mine.png | Bin 0 -> 456 bytes case_trois.png | Bin 0 -> 430 bytes case_un.png | Bin 0 -> 293 bytes case_vide.png | Bin 0 -> 228 bytes demineur.js | 24 ++++++++++++++++++++++++ 6 files changed, 24 insertions(+) create mode 100644 case_deux.png create mode 100644 case_mine.png create mode 100644 case_trois.png create mode 100644 case_un.png create mode 100644 case_vide.png diff --git a/case_deux.png b/case_deux.png new file mode 100644 index 0000000000000000000000000000000000000000..ed29af6d4f952422d400e61e1d8c7a869dca8ec6 GIT binary patch literal 389 zcmV;00eb$4P)C zgnIU&)|C*c9g{@n-^HJ6`drk(Zq-o`rVuTlv?iAAQ_@KF>@|W&1et_*`_-mFL8KJ8 zkFO|^jNx`hMMx$~1zC2OQCm1mgm{f`XUrPm0`WkYLc9Q`yOuY?B#{UN91?|qLLw0` zNHhWhp&+>Lopn9s;HY}Ddmzk@@m>g1h$q4f;*DsK_IX;n$13kvZNJLCp|>{(bUFcz j)td-lazdM^=Kor6r_^T7B148A00000NkvXXu0mjfp`f23 literal 0 HcmV?d00001 diff --git a/case_mine.png b/case_mine.png new file mode 100644 index 0000000000000000000000000000000000000000..4de775ef137058157fde9708753e191b283cb322 GIT binary patch literal 456 zcmV;(0XP1MP)xJ(1d1VP-d3JQi?w-;C?%^yizyM^D#8=xaL6Cb^S?QmSuUz z{ZXWYd|Ah?h(-YC+;ALaCdWq==^%joYDF~JE!js6@}9Fv&zEeU1;WBGAWT~yM>a?b zW}2o;hi}^!eaAwWfy7|$0M5}%APs~mh=gGv0+ff*LYRa20q-F8eILegq^$(oKs+$yyNwKGt2tgnqS{M_MloF|I#@@5abP$=vCKN#-e0_xHZsw8+V(gV| zEd)eDFfdht#2`?ZA|QU%jXlyPA?Vm|mVINV%;MInPLZp%;BRU~uIgxQ$c-erm}XlG z-JYNUX&}sYzlgm$2$%sAYoYe4e)rqdc?5w;DZ;GeXUCaY%MTpR+?wLA=FEP+IACC^ zxkb6V{rH)CE#?ZRRNL$YkqJ!J5V$l@_gv~?XCX8oOdmA}npN3O1CM^EgP@seQV|V2 y+UHSgp+RZdbr4O~O7>}2k&;<^V(e!Auk`|^u*S}r&=7k70000E0_KSOrBPnBo64*fd+(q+ebSp~|YR>+X`lQ)LIzw(Vbf zX`1FU@5x93+1X<;va^7%^u>r|=|D7VTU!(DnD40ZB1kAj3q~5=+UX>-!gs z6x$6VP0IQnff#Zf0tAIP1PBAd4N~<_*FV|RA+9RkDril^C z1%evUfLMzKfmoBx3!s6q6bu5HC-OisVQ3(h>P46-AYKF3hEeLVc0IKsV4$VN?tqca z?*c);9jr!%@zN3t0kO0iQc<+ALP3}ZLWmKm>0<(DmKD_fYL^59O0ofgq_U!cfI-G; zN7&H39-g8%>k literal 0 HcmV?d00001 diff --git a/case_un.png b/case_un.png new file mode 100644 index 0000000000000000000000000000000000000000..ebb7475efe65fc9c202189b55661dc71fdd3049b GIT binary patch literal 293 zcmV+=0owkFP)(A?gIk^A{Foo?5z*bD`!0PhhNBWq2P1k&}B9S}tyY})-|1S3XoQAjOPi`3fA z0cwOAp+=~YCIYnauaI5uMhhc?JR`OEsw+qri%YvsEsG6l*91fx rIjeaXv5KsA-NuM^Ausa|^S{;;+_Xi`Wg`p100000NkvXXu0mjff)I0B literal 0 HcmV?d00001 diff --git a/case_vide.png b/case_vide.png new file mode 100644 index 0000000000000000000000000000000000000000..915ef3a6f7c7fde2a63f41d4f5d2cad5a1fd353f GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nET)t)YnAsNnZXKmzdF<>|{@1Rk5 z+KDTBTpXR#Pd>6Y`YV~V{E0;JocX--l6N5uCGs$q9Qp8-7H61Eq$=Xd Date: Thu, 5 Dec 2024 20:20:52 +0100 Subject: [PATCH 6/7] =?UTF-8?q?timer=20ajout=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO.txt | 1 + demineur.html | 13 +++++++++---- demineur.js | 30 ++++++++++++++++++++++++++++++ style.css | 19 ++++++++++++++----- 4 files changed, 54 insertions(+), 9 deletions(-) create mode 100644 TODO.txt diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 0000000..858d9ac --- /dev/null +++ b/TODO.txt @@ -0,0 +1 @@ +younes: final chrono , pop up cookie , centrer ligne , animation pop up diff --git a/demineur.html b/demineur.html index ac25e47..859c424 100644 --- a/demineur.html +++ b/demineur.html @@ -5,6 +5,7 @@ Démineur + @@ -15,17 +16,21 @@ +
Temps: -
+ + +
Mines restantes:10
ICI se retourve le jeu
+ + - - + - \ No newline at end of file + diff --git a/demineur.js b/demineur.js index 2c431da..707faf1 100644 --- a/demineur.js +++ b/demineur.js @@ -7,3 +7,33 @@ class Case { } } +function sleep(ms){ + return new Promise(resolve => setTimeout(resolve, ms)); +} +async function chrono(){ + let k=document.getElementById("temps").value; + const myButton = document.getElementById("fin_game"); + let arret=0; + + while(arret==!1) { + + await sleep(1000); + document.getElementById("temps").value=document.getElementById("temps").value*1+1; + myButton.addEventListener("click",() =>{arret=1;}) +} +} +async function reset(){ + await sleep(500); + document.getElementById("temps").value=0; + +} + +function Cookies() { + var accept = confirm("Tu veux des cookies ?"); + if (accept === true) { + alert("Bon jeu!"); + } else { + Cookies(); + } + } +Cookies(); \ No newline at end of file diff --git a/style.css b/style.css index 4375b34..f94e073 100644 --- a/style.css +++ b/style.css @@ -1,6 +1,6 @@ #nav_demineur{ width: 100%; - background-position:0cm; + background-color: #2bd7d484; border-width: 2px; border-style: double; @@ -18,13 +18,22 @@ } #jeu{ + display: flex; - justify-content: center; - /* border-width: 2px; - border-style: double; */ + justify-content: left; + border-width: 2px; + border-style: double; + width: 49%; } .item_nav{ margin-top: 3px; padding-right: 10px; -} \ No newline at end of file +} +.vertical-line{ + border-left: 4px solid #000; + display: inline-block; + height: 400px; + margin: 0 50% ; + padding-top: 0; + } \ No newline at end of file From 0b5cc81150273d5ad2cd093ca6c8acbb24fc02a5 Mon Sep 17 00:00:00 2001 From: Bezza Younes Date: Thu, 5 Dec 2024 21:35:50 +0100 Subject: [PATCH 7/7] correction timer , enlever barre vertical --- demineur.html | 3 ++- demineur.js | 19 +++++++++---------- style.css | 11 ++++------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/demineur.html b/demineur.html index 859c424..88a32dc 100644 --- a/demineur.html +++ b/demineur.html @@ -31,6 +31,7 @@ - + + diff --git a/demineur.js b/demineur.js index 7f53e08..cb8753e 100644 --- a/demineur.js +++ b/demineur.js @@ -12,7 +12,6 @@ class Case { } } -<<<<<<< HEAD function sleep(ms){ return new Promise(resolve => setTimeout(resolve, ms)); } @@ -20,16 +19,18 @@ async function chrono(){ let k=document.getElementById("temps").value; const myButton = document.getElementById("fin_game"); let arret=0; - - while(arret==!1) { - - await sleep(1000); - document.getElementById("temps").value=document.getElementById("temps").value*1+1; myButton.addEventListener("click",() =>{arret=1;}) + + while(arret==!1) { + await sleep(1000); + if (arret==!1){ + document.getElementById("temps").value=document.getElementById("temps").value*1+1; + +} } } async function reset(){ - await sleep(500); + document.getElementById("temps").value=0; } @@ -42,8 +43,7 @@ function Cookies() { Cookies(); } } -Cookies(); -======= +//Cookies(); let grille = []; @@ -63,4 +63,3 @@ function creerGrille(haut, larg) { } ->>>>>>> c1749f127de61663f2681184e2809c5310ee00a5 diff --git a/style.css b/style.css index f94e073..4003752 100644 --- a/style.css +++ b/style.css @@ -24,16 +24,13 @@ border-width: 2px; border-style: double; width: 49%; + } .item_nav{ margin-top: 3px; padding-right: 10px; + } -.vertical-line{ - border-left: 4px solid #000; - display: inline-block; - height: 400px; - margin: 0 50% ; - padding-top: 0; - } \ No newline at end of file + +