Ejemplo n.º 1
0
  public String sendMove() {

    MiniMaxAlphaBeta miniMaxAlphaBeta = new MiniMaxAlphaBeta();

    Node bestNode = miniMaxAlphaBeta.getBestNode(new Node(currentGame, playingAs));

    // System.out.println("L'heuristique de la best node : " + bestNode.getHeuristicValue());

    Move bestMove = bestNode.getBestMove();
    // Apply move to board
    this.currentGame = JeuUtil.applyMoveToBoard(currentGame, bestMove);

    return Move.ConvertMove.moveToString(bestMove);
  }
Ejemplo n.º 2
0
  public void receiveMove(String move) {
    Move convertedMove = Move.ConvertMove.stringToMove(move);

    currentGame = JeuUtil.applyMoveToBoard(currentGame, convertedMove);
  }