forked from menault/TD3_DEV51_Qualite_Algo
Part 1 finis
This commit is contained in:
18
word_search.java
Normal file
18
word_search.java
Normal file
@@ -0,0 +1,18 @@
|
||||
import java.util.Random;
|
||||
|
||||
public class word_search {
|
||||
|
||||
// Liste des mots
|
||||
private static String[] WORDS = {
|
||||
"singe", "google", "frapper", "haine", "dio", "java",
|
||||
"felix vimalaratnam", "lebreton", "argent", "pauvre", "grocaillou"
|
||||
};
|
||||
|
||||
/**
|
||||
* Retourne un mot aléatoire du tableau WORDS
|
||||
*/
|
||||
public static String getRandomWord() {
|
||||
Random random = new Random();
|
||||
return WORDS[random.nextInt(WORDS.length)];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user