1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
public Main(int x,int y,int taux) {//prend en paramètre les dimensions de la grille et le taux
X = x;
Y=y;
TAUX=taux;
initData(x, y, taux);
initLayout(x,y,taux);
}
private void initData(int x,int y,int taux) {
GenerateurCarte generateurCarte = new GenerateurCarte();
try {
grilleJeu = generateurCarte.genererCarte(x, y, taux, joueurs);
} catch (WaterWoldExeption e) {
e.printStackTrace();
}
}
private void initLayout(int x,int y, int taux) {
CreationGrille grille = new CreationGrille(grilleJeu, joueurs,etatDePartie);
this.setLayout(new BorderLayout());
this.add(grille); |
Partager