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
31
32
33
34
35
36
37
38
39
40
41
42
package tictactoecodingame;
/**
* @author Franck
*/
public class JoueurOrdi extends Joueur {
boolean ponder; // Si vrai l'ordinateur réfléchi pendant la reflexion de son adversaire
AlgoRecherche algoRecherche;
public JoueurOrdi(String _nom) {
super(_nom);
ponder = false;
}
public JoueurOrdi( String _nom , AlgoRecherche _algo , boolean _ponder ) {
super( _nom );
algoRecherche = _algo;
ponder = _ponder;
}
public JoueurOrdi( String _nom , AlgoRecherche _algo ) {
this( _nom , _algo , false );
}
public AlgoRecherche getAlgoRecherche() {
return algoRecherche;
}
public void setAlgoRecherche(AlgoRecherche _algoRecherche) {
algoRecherche = _algoRecherche;
}
public Coup joue(Plateau _plateau ) {
Coup coupOrdi;
coupOrdi = algoRecherche.meilleurCoup(_plateau , this , ponder);
return coupOrdi;
}
}