forked from bocquel/Projet_JS
Ajout d'images
This commit is contained in:
parent
666e1d8467
commit
c1749f127d
6 changed files with 24 additions and 0 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 |
24
demineur.js
24
demineur.js
|
@ -4,6 +4,30 @@ class Case {
|
|||
this.posy = y;
|
||||
this.isMine = false;
|
||||
this.number = 0;
|
||||
this.hidden = true;
|
||||
}
|
||||
|
||||
get imageName() {
|
||||
return this.getImageName();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue