title: Bug with double letters in hangman
body: <p>I am having problems with double letters. When the user inputs a letter twice, they just keep replacing each other. In the beginning I assign the userArray a list of as's and if the userGuess input is in the hiddenWord I remove one of the a's and replace it with userGuess.I use the .equals() to compare the userArray and hiddenWord. I have tried using the continue; to skip to the next iteration and not delete the first (double occuring word) but when a word has 2 d's, they both have the same index. Like in digger, the 2 g's share the same index. So when I remove</p>
  
  <pre><code>void getUserInput(ArrayList&lt;Character&gt; thisArray) {
      System.out.println("The word you are trying to guess for contains: " + letteramnt + " letters");
      correct=false;
      ArrayList&lt;Character&gt; userArray = thisArray;
      Scanner ugScanner = new Scanner(System.in);
      correct = false;
      ArrayList&lt;Character&gt;Guesses = new ArrayList&lt;Character&gt;();
      while(correct==false) {
          System.out.println("You have guessed the following:"+ Guesses);
          System.out.println("Enter your guess(character):");
          userGuess = ugScanner.next().charAt(0);
          Guesses.add(userGuess);
          for(char element:hiddenWord) {    
              if(userGuess==element) {   
                  System.out.println("Good guess");
                  elementindex=hiddenWord.indexOf(element);
                  if(userGuess==userArray.get(elementindex)) {
                      System.out.println("continuing");
                      continue;//should skip to next iteration
                  }
                  userArray.remove(elementindex);//
                  userArray.add(elementindex,userGuess);
              }
              if (userArray.equals(hiddenWord)||Guesses.equals(hiddenWord)) {
                  correct = true;
                  System.out.println("The hidden word was: "+hiddenWord);
                  break;
  </code></pre>