private int maxValue(int[][] grid, int depth, int alpha, int beta)
	{
		//check if the board is in a terminal (winning) state and
		//return the maximum or minimum utility value (255 - depth or 
		//0 + depth) if the max player or min player is winning.
		int winner = checkForWinner(grid);
		if ( winner != GV.PLAYER_EMPTY)
		{
			if ( winner == player)
				return 255 - depth;
			else
				return depth; 
		}
		//check if the depth has reached its limit or if the 
		//board is in a terminal (tie) state and return its utility value.
		if ( (depth == searchDepthLimit) || isDraw(grid))
			return evaluateContent(grid);
		
		depth++;
		
		int column = 0;
		for (int i = 0; i < GV.BOARD_COLUMNS; i++)
		{ 
			int lowestemptyrow = getLowestEmptyRow(grid, i);
			if (lowestemptyrow>=0) 
			{
				grid[lowestemptyrow][i] = player;
				
				int value = minValue(grid, depth, alpha, beta);
				if (value > alpha) 
				{
					alpha = value;
					column = i;
				}
				remove(grid, i);
				if (alpha >= beta) 
					return alpha;
			}
		}
		this.proposedColumn = column;
		return alpha;
	}