MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / updateGuessed

Method updateGuessed

Programs/Games/HangMan.java:58–68  ·  view source on GitHub ↗
(char letter, int[] loc)

Source from the content-addressed store, hash-verified

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, ' ');

Callers 1

playMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected