public int alphaBetaNegamax( Board board, int depth, int alpha, int beta ) {
    if ( board.isCheckmate() ) {
      return ( Integer.MIN_VALUE + 1 + this.depth - depth );
    } else if ( board.isStalemate() ) {
      return 0;
    } else if ( depth <= 0 ) {
      return ( evaluator.evaluate( board ) );
    }

    int score = Integer.MIN_VALUE + 1;
    for ( Move move : board.getValidMoves() ) {
      Board child = new Board( board );
      child.makeMove( move );
      score = -alphaBetaNegamax( child, depth - 1, -beta, -alpha );
      if ( score >= beta ) return ( score );
      if ( score > alpha ) alpha = score;
    }

    return ( alpha );
  }