int guess(String solution) {
        int count = 0;
 
        count++;
        int a = getA(solution, "1234");
        if (a == 4) {
            return count;
        }
        int b = getB(solution, "1234");
        reduce("1234", a, b);
 
        for (int i = 0; i < validSet.length; i++) {
            if (!validSet[i]) {
                continue;
            }
            count++;
            a = getA(solution, answerSet[i]);
            if (a == 4) {
                break;
            }
            b = getB(solution, answerSet[i]);
            reduce(answerSet[i], a, b);
        }
 
        return count;
    }