public int guess(char guess) throws IllegalStateException, IllegalArgumentException {
        if (this.word.isEmpty() || this.word == null || this.guessesLeft == 0) throw new IllegalStateException(this.word); 
        if (this.guesses.contains(guess)) throw new IllegalArgumentException();
        
        this.guesses.add(guess);
        int count = 0;
        
        for (int i = 0; i < this.word.length(); i++) {
            if (word.charAt(i) == guess) count++; 
        }
        
        if (count == 0) {
            this.guessesLeft--;
        }
        
        return count;
    }