Package pdp.scrabble.ia

Source Code of pdp.scrabble.ia.AIFactory

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;
    }
   
}
TOP

Related Classes of pdp.scrabble.ia.AIFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.