private int expandMaxNode(int depth, int prevBeta){
        // if cutoff test is satisfied
        if (board.isGameOver() || depth == 0)
            return board.getBoardStats().getStrength(maxPlayer);

        Move[] moves = board.getPossibleMoves(maxPlayer);

        int alpha = MIN_POSSIBLE_STRENGTH;
        int current;
    
        // explore each move in turn
        for(int i = 0; i < moves.length; i++) {
            if(board.move(moves[i])) {   // move was legal (column was not full)
                moveCount++;  // global variable

                // *************************************
                //              CODE NEEDED 
                //             (mostly here)  
                // *************************************

                current = expandMinNode(depth - 1, alpha);

                // early return for alpha/beta pruning
                if (current > prevBeta) {
                    if (board.getPruning()) {
                        board.undoLastMove();
                        return current;
                    } else {
                        // System.out.println("An early return would have happened here, if pruning were turned on.");
                    }
                }

                if (current > alpha)
                    alpha = current;

                board.undoLastMove();   // undo exploratory move
            }  // end if move made
            
        }  // end for all moves
        
        return alpha;
        
    }