private MoveEvalScore alphabeta(BoardMove node,int depth, int hole, MoveEvalScore alpha, MoveEvalScore beta)
  {
    //if depth = 0 or node is a terminal node
    //display("AlphaBeta called \ndepth: " + depth);
    if(depth == 0 || Kalah.gameOver(node.getBoard()))
    {  
      //heuristic value of node
      MoveEvalScore result = new MoveEvalScore(node.getHoleMoved(), evalFunc.compareScoringWells(node, ourSide, hole));
//      display("End of tree reached " + result + "\nboard:\n" + node.getBoard().toString() + "\n" + 
//              (node.getBoard().getSeedsInStore(ourSide) + "-" + 
//              node.getBoard().getSeedsInStore(ourSide.opposite())) + " * 2 + " + 
//              (node.getBoard().getSeedsInPlay(ourSide) + "-" + 
//              node.getBoard().getSeedsInPlay(ourSide.opposite())));
      return result;
    }

    List<BoardMove> children = createChildren(node, depth - 1);

    if (node.getNextSide().equals(ourSide)) 
    {
      for (BoardMove child : children) 
      {
        MoveEvalScore temp = alphabeta(child, depth - 1, hole, alpha, beta);
//        display("MAX alpha " + alpha + "\n\nnew alpha " + temp);
        alpha = max(alpha, temp);
        if (beta.getScore() <= alpha.getScore())
          break;
      }
      MoveEvalScore result = new MoveEvalScore(node.getHoleMoved() == -1 ? alpha.getMove() : node.getHoleMoved(), alpha.getScore());
      display("Aplha: " + result);
      return result;
    } 
    else 
    {
      for (BoardMove child : children)
      {
        MoveEvalScore temp = alphabeta(child, depth - 1, hole, alpha, beta);
//        display("MIN beta " + beta + "\n\nnew beta " + temp);
        beta = min(beta, temp);
        if (beta.getScore() <= alpha.getScore())
          break;
      }
      MoveEvalScore result = new MoveEvalScore(node.getHoleMoved() == -1 ? beta.getMove() : node.getHoleMoved(), beta.getScore());
      display("Beta: " + result);
      return result;
    }
  }