package pdp.scrabble.ia;
import pdp.scrabble.dictionary.DAWGItf;
import pdp.scrabble.game.AILevel;
import pdp.scrabble.game.GameEnvironment;
import pdp.scrabble.game.Player;
import pdp.scrabble.ia.impl.DawgMoveGen;
import pdp.scrabble.ia.impl.SimpleMoveAccumulator;
import pdp.scrabble.ia.impl.SimpleSimulator;
/**Utility factory class*/
public class AIFactory {
public static AbstractAlgoStep getAlgo(AILevel level, GameEnvironment env) {
AbstractAlgoStep algo = new DawgMoveGen(env,(Player) null, (DAWGItf) env.getDictionary(),
new SimpleMoveAccumulator(null));
if (level.getNbSimulations()>0)
algo = new SimpleSimulator(algo, env, null);
return algo;
}
}