Commit 60b5f5a7 authored by Theo Delbecq's avatar Theo Delbecq

Correction de Generator, ajouts de constructeurs et paramètres sur...

Correction de Generator, ajouts de constructeurs et paramètres sur ArbreMinMax, création incomplète de AlgoRechercheMinMax
parent 895f53f5
......@@ -9,16 +9,20 @@
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/AlgoRecherMinMax1.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/Joueur.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/JoueurOrdi.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/Arbre.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/AlgoRecherche.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/JoueurHumain.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/AlgoRechercheMinMax.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/Jeton.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/Case.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/ArbreMinMax.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/Plateau.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/Arbitre.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/AlgoRechercheAleatoire.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/Generator.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/GrilleTicTacToe3x3.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/GrilleTicTacToe9x9.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/Fraction.java</file>
<file>file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/Piece.java</file>
</group>
</open-files>
......
......@@ -15,6 +15,8 @@ public class ArbreMinMax {
public static int N = 5;
protected int value;
//Coup théorique joué à ce noeud
protected Coup coup;
protected ArrayList<Coup> coups;
protected ArrayList<ArbreMinMax> fils;
......@@ -23,6 +25,10 @@ public class ArbreMinMax {
public ArbreMinMax(){
}
public ArbreMinMax(Coup coup){
this.coup = coup;
}
public ArbreMinMax(int value, ArrayList coups, ArrayList fils){
this.value = value;
this.fils = fils;
......@@ -56,6 +62,10 @@ public class ArbreMinMax {
return(fils);
}
public Coup getcoup(){
return coup;
}
public ArrayList getcoups(){
return(coups);
}
......
......@@ -10,7 +10,7 @@ package tictactoecodingame;
* @author Théo
*/
public class Generator {
public static int random_tests(Plateau plateau, int nb_tests) {
public static int random_tests(Plateau plateau, int nb_tests,Joueur target) {
int c = 0;
JoueurOrdi player = new JoueurOrdi("player");
JoueurOrdi opponent = new JoueurOrdi("oppo");
......@@ -39,9 +39,9 @@ public class Generator {
}
Joueur vainqueur = plateau.vainqueur();
if ( vainqueur == player )
if ( vainqueur.getIdJoueur() == target.getIdJoueur() )
c++;
else if ( vainqueur == player )
else if ( vainqueur.getIdJoueur() != target.getIdJoueur() )
c--;
plateau.restaurePosition(0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment