Ordi_vs_Ordi.java 1.33 KB
Newer Older
Alain's avatar
Alain committed
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
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package tictactoecodingame;

/**
 *
 * @author Alain
 */
public class Ordi_vs_Ordi {
    
    public static void main(String args[]) {
        
        JoueurOrdi joueurOrdi1 = new JoueurOrdi("Ordi1");     
        JoueurOrdi joueurOrdi2 = new JoueurOrdi("Ordi2");
       
        
        // Remplacer ici l'algorithme aléatoire par votre algorithme. 
        // Créer une nouvelle classe qui hérite de la class AlgoRecherche
        AlgoRechercheAleatoire alea1  = new AlgoRechercheAleatoire( );   // L'ordinateur joue au hasard
        joueurOrdi1.setAlgoRecherche(alea1);       
        AlgoRechercheAleatoire alea2  = new AlgoRechercheAleatoire( );   // L'ordinateur joue au hasard
        joueurOrdi2.setAlgoRecherche(alea2);       
             
        GrilleTicTacToe3x3 grille = new GrilleTicTacToe3x3();
         
        Arbitre a = new Arbitre(grille, joueurOrdi1 , joueurOrdi2 );
       
        a.startNewGame(true);    // Demarre une partie en affichant la grille du jeu
       
       // Pour lancer un tournooi de 100 parties en affichant la grille du jeu
        //a.startTournament(1000 , false);
        
    }
    
}