Newer
Older
import puissance4.model.Grille;
import puissance4.model.Joueur;
import java.util.ArrayList;
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
private Grille grilleCourant;
private Joueur JoueurCourant;
private Joueur victoire;
private ArrayList<Joueur> ListeJoueur;
public Puissance4Controleur() {
this.grilleCourant = new Grille();
this.JoueurCourant = null;
this.victoire = null;
this.ListeJoueur = new ArrayList<Joueur>();
}
public void startGame() {
this.setJoueurCourant(this.ListeJoueur.get(0));
}
public Grille getGrilleCourant() {
return this.grilleCourant;
}
private void setGrilleCourant(Grille grilleGame) {
this.grilleCourant = grilleGame;
}
public Joueur getJoueurCourant() {
return this.JoueurCourant;
}
private void setJoueurCourant(Joueur JoueurCourant) {
this.JoueurCourant = JoueurCourant;
}
private ArrayList<Joueur> getListeJoueur() {
return ListeJoueur;
}
public void addJoueur(Joueur joueur) {
this.ListeJoueur.add(joueur);
}
public void JoueurSuivant() {
if(this.JoueurCourant==this.ListeJoueur.get(0)){
this.setJoueurCourant(this.ListeJoueur.get(1));
}
else{
this.setJoueurCourant(this.ListeJoueur.get(0));
}
}
private Joueur getVictoire() {
return this.victoire;
}
private void setVictoire(Joueur joueurVictoire) {
this.victoire = joueurVictoire;
}
public boolean peutJouer(int Ligne, int Colonne)
return true; //pas fini