public void setGoalGradMerged() {
        
        // set high values
        for (int row = 0; row < Board.getNbRows(); row++) {
            // for each col
            for (int col = 0; col < Board.getNbCols(); col++) {
                goalGradMerged[row][col] = -1;
            }
        }
    	
    	int value;
        // for each row
        for (int row = 0; row < Board.getNbRows(); row++) {
            // for each col
            for (int col = 0; col < Board.getNbCols(); col++) {
                // for every goal
                value = Integer.MAX_VALUE;
                for (int i = 0; i < Board.getNbOfGoals(); i++) {
                	if (goalsOccupied[i]){
               		//do nothing
                	}
                	else if(value > Board.getGoalGrad(i, row, col) &&
                    		Board.getGoalGrad(i, row, col) != -1) {
                        goalGradMerged[row][col] = Board.getGoalGrad(i, row, col);
                        value = goalGradMerged[row][col];
                    }
                }
            }
        }

    }