Merge branch 'main' of https://git.etud.insa-toulouse.fr/bocquel/Projet_JS
ajout timer
This commit is contained in:
commit
9276325c2c
6 changed files with 28 additions and 1 deletions
BIN
case_deux.png
Normal file
BIN
case_deux.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 389 B |
BIN
case_mine.png
Normal file
BIN
case_mine.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 456 B |
BIN
case_trois.png
Normal file
BIN
case_trois.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 430 B |
BIN
case_un.png
Normal file
BIN
case_un.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 293 B |
BIN
case_vide.png
Normal file
BIN
case_vide.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 228 B |
29
demineur.js
29
demineur.js
|
@ -4,9 +4,15 @@ class Case {
|
|||
this.posy = y;
|
||||
this.isMine = false;
|
||||
this.number = 0;
|
||||
this.hidden = true;
|
||||
}
|
||||
|
||||
get imageName() {
|
||||
return this.getImageName();
|
||||
}
|
||||
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
function sleep(ms){
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
@ -36,4 +42,25 @@ function Cookies() {
|
|||
Cookies();
|
||||
}
|
||||
}
|
||||
Cookies();
|
||||
Cookies();
|
||||
=======
|
||||
|
||||
let grille = [];
|
||||
|
||||
function creerGrille(haut, larg) {
|
||||
grille.length = haut;
|
||||
let i = 0;
|
||||
let j = 0;
|
||||
while (i < haut) {
|
||||
grille[i] = Array(larg);
|
||||
j = 0;
|
||||
while (j<larg) {
|
||||
grille[i][j] = new Case(j, i);
|
||||
j = j + 1 ;
|
||||
}
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
>>>>>>> c1749f127de61663f2681184e2809c5310ee00a5
|
||||
|
|
Loading…
Reference in a new issue