Letter positions, figuring out a smart way for a word guess game
<p>I am learning Java and in the process I am writing a Word Guess game. 
Now mine problem is the following:</p>

<p>Assume the word to guess is "lingo". And assume "oodle" is a word you suggested.
On processing your guess, the following should be output:
Correct Letters: none
Wrong Position Letters: 'o' at first position, 'l' at fourth position
Note that the second 'o' should not be mentioned as a letter in the wrong position, as we already have reported an 'o' prior to that. So if you enter 'ooooo', only the last letter should be highlighted as it is in the correct position, and if you enter 'ooooz', only the first letter should be highlighted, and not the other 'o's. </p>

<p>I have tried some solutions but all seem to fail. I know there is a smart/not so complex way to do this. So could anyone help me with that? </p>

<p>The code:</p>

<pre><code>// / Indicates whether a letter has been accounted for
// / while highlighting letters in the guess that are not
// / in the correct position
private Boolean[][] marked = new Boolean[WordLength][5];

// / Holds which all letters have been solved so far
private Boolean[][] solved = new Boolean[WordLength][6];


public void CheckLetters() {

    for (int j = 0; j &lt; currentAttempt; j++) {
        tempWord = list.get(j); //The guessed words

        for (int i = 0; i &lt; WordLength; i++) {

            if (tempWord.charAt(i) == CurrentPuzzleWord.charAt(i)) {
                solved[i][j] = true; //CurrentPuzzleWord is the string with the hidden word

            } else if (CurrentPuzzleWord.indexOf(tempWord.charAt(i)) != -1) {
                marked[i][j] = true;
            }
        }
    }
</code></pre>
