2026-03-30 22:33:20 +02:00
|
|
|
import java.io.Serializable;
|
|
|
|
|
import java.util.Random;
|
|
|
|
|
|
|
|
|
|
public class Grille implements Serializable {
|
|
|
|
|
private Case[][] plateau;
|
|
|
|
|
private int lignes;
|
|
|
|
|
private int colonnes;
|
|
|
|
|
private int mines;
|
|
|
|
|
|
2026-04-03 16:56:08 +02:00
|
|
|
public int getLignes() { return this.lignes; }
|
|
|
|
|
public int getColonnes() { return this.colonnes; }
|
|
|
|
|
|
2026-03-30 22:33:20 +02:00
|
|
|
|
|
|
|
|
public Grille(int l, int c, int m) {
|
|
|
|
|
this.lignes = l;
|
|
|
|
|
this.colonnes = c;
|
|
|
|
|
this.mines = m;
|
|
|
|
|
|
|
|
|
|
this.plateau = new Case[this.lignes][this.colonnes];
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < this.lignes; i++) {
|
|
|
|
|
for (int j = 0; j < this.colonnes; j++) {
|
|
|
|
|
this.plateau[i][j] = new Case();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|