forked from menault/TD3_DEV51_Qualite_Algo
19 lines
467 B
Java
19 lines
467 B
Java
|
|
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)];
|
||
|
|
}
|
||
|
|
}
|