forked from menault/TD3_DEV51_Qualite_Algo
branche jude
This commit is contained in:
21
PenduJudeChrist/GameLogic.java
Normal file
21
PenduJudeChrist/GameLogic.java
Normal file
@@ -0,0 +1,21 @@
|
||||
import java.util.Scanner;
|
||||
import java.util.Random;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
|
||||
|
||||
public class GameLogic {
|
||||
|
||||
public static boolean isWordGuessed(String word, Set<Character> guessedLetters){
|
||||
|
||||
for (int i = 0; i < word.length(); i++ ) {
|
||||
if(!guessedLetters.contains(word.charAt(i))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user