Here's an example of what I want it to do:
Say the word is: a b o v e
I have 4 guesses to guess this word.
I guess 'a' so therefore I now have 3 guesses left.
How do I deduct?
I have an array called underscore which holds an underscore for each character. So here is my code:
public int guesses_left() { for(int i = 0; i < underscore.length; i++) { if(underscore[i] != '_') { int amount = underscore.length; return amount; } } int default1 = underscore.length - 1; return default1; }
Suffice to say, it did not work