title: Delete letter from string in a for loop
body: <p>How can i get the letter from guess out of alphabet? So if the first guess is AABB i need to get the A and the B out of the String alphabet to make a new random guess without the letters A and B.</p>
  
  <pre><code>    randomCode.clear();//Clears the random code ArrayList to put a new one in it
      Random r = new Random();
      String alphabet = "ABCDEF";
      StringBuilder result = new StringBuilder(randomCode.size());
  
      if(turn == 0){
          guess = "AABB";
  
      }else{
          if(blackPin == 0 &amp;&amp; whitePin ==0){
              for (int c = 0; c &lt; 4; c++) {
                  if(alphabet.charAt(c) == guess.charAt(c)){
  
                  }
                  randomCode.add(alphabet.charAt(r.nextInt(alphabet.length())));//generate 4 random letters with the letters ABCDEF and put in arrayList
              }
              for (Character c : randomCode){//Converts Char[] randomCode to a String
                  result.append(c);
                  }
              guess = result.toString();//Gives the String guess 4 random letters.
  </code></pre>