(char letter, int[] loc)
| 56 | } |
| 57 | |
| 58 | public void updateGuessed(char letter, int[] loc) { |
| 59 | int length = this.guessedWord.length; |
| 60 | int ind = 0; |
| 61 | for(int i = 0; i < length; i++){ |
| 62 | if(i == loc[ind]){ |
| 63 | ind++; |
| 64 | this.guessedWord[i] = letter; |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | } |
| 69 | |
| 70 | public void removeAlphabet(char letter){ |
| 71 | this.alphabets = this.alphabets.replace(letter, ' '); |