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

Method setIndices

Programs/Games/HangMan.java:45–56  ·  view source on GitHub ↗
(char letter)

Source from the content-addressed store, hash-verified

43 }
44
45 public void setIndices(char letter){
46 int length = this.compPick.length();
47 int ind = 0;
48 char[] comPickArray = this.compPick.toCharArray();
49 this.indices = new int[length];
50 for(int i = 0; i < length; i++){
51 if(letter == comPickArray[i]){
52 this.indices[ind] = i;
53 ind++;
54 }
55 }
56 }
57
58 public void updateGuessed(char letter, int[] loc) {
59 int length = this.guessedWord.length;

Callers 1

playMethod · 0.95

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected