Example #1
0
  /**
   * Compute and return a move in the current position.
   *
   * <p>The returned move must be in the String format accepted by the server.
   *
   * @param myTime number of seconds left on the player's clock
   * @param opTime number of seconds left on the opponent's clock
   */
  public ArrayMove computeMove(int myTime, int opTime) {
    assert (false) : "Assertions should be disabled when playing competitively.";

    System.out.println(eval.eval(board));

    ArrayMove move = searcher.getBestMove(getBoard(), myTime, opTime);

    return move;
  }
Example #2
0
 /**
  * Adds an Observer to the Searcher so that when a new best move is found, the Observer will be
  * notified.
  *
  * @param o the new Observer
  */
 public void addBestMoveObserver(Observer o) {
   searcher.addBestMoveObserver(o);
 }
Example #3
0
 public Engine(int time, int inc) {
   searcher.setFixedDepth(4);
   searcher.setEvaluator(eval);
 }