Commit 2779f37c authored by CRESCENCE Cassandre's avatar CRESCENCE Cassandre

Add new file

parent a717a53b
Pipeline #471 canceled with stages
/*
* 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;
import java.util.ArrayList;
import java.util.Random;
/**
*
* @author franck.tempet
*/
public class AlgoRechercheAleatoire extends AlgoRecherche{
Random rnd;
public AlgoRechercheAleatoire() {
rnd = new Random();
}
@Override
public Coup meilleurCoup(Plateau _plateau, Joueur _joueur, boolean _ponder) {
ArrayList<Coup> coups = _plateau.getListeCoups(_joueur);
return coups.get(rnd.nextInt( coups.size()));
}
}
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