#Don't know how to fix user guesses not being inputted

1 messages · Page 1 of 1 (latest)

opal ice
#

Hello so I am creating a hangman game and I added a check to tell the user that they can't repeat letters they have already guessed but the output is a bit funky.

brazen charmBOT
#

<@&987246399047479336> please have a look, thanks.

junior kiln
#

What specifically is the problem

opal ice
#

okay so i cant guess anything without the you've already guessed this letter poppping up

#

that was the first letter i typed after running the program

junior kiln
#

Can you show your code?

opal ice
#

all of it? or the method

#

ill just send all of it

#

lemme convert to txt rq

#

ahh

#

it wont let me convert

#

gimme a sec

brazen charmBOT
opal ice
#

okay

#

@junior kiln

junior kiln
#
            guess.add(guessedletter);
            boardState(answer, guess);
            if (correctLetter == answer.length()) {
                System.out.println("\nYou won!");
                break;
            }   if(guess.contains(guessedletter)){
                System.out.println("You've already guessed this letter you can't guess it again");
                continue;
            }

in this section you add the guessed letter to the list of guesses before checking whether the letter is already in the list

brazen charmBOT