public String compareNumber(String generatedNumber, String guessedNumber) {
        int number_of_A = 0;
        int number_of_B = 0;

        for (int i = 0; i < 4; i++) {
            if (generatedNumber.charAt(i) == guessedNumber.charAt(i)) {
                number_of_A += 1;
            }
            for (int j = 0; j < 4; j++) {
                if ((generatedNumber.charAt(i) == guessedNumber.charAt(j)) && i != j) {
                    number_of_B += 1;
                }
            }
        }

        return number_of_A + "A" + number_of_B + "B";
    }