master
This commit is contained in:
parent
2ad8b34a6f
commit
78548e5c04
Binary file not shown.
1048576
bin/lab6/french_common_words.csv
1048576
bin/lab6/french_common_words.csv
File diff suppressed because it is too large
Load Diff
331782
bin/lab6/mots.csv
Normal file
331782
bin/lab6/mots.csv
Normal file
File diff suppressed because it is too large
Load Diff
@ -66,10 +66,10 @@ public class WordManager {
|
||||
askLevel += "('d' for difficult)";
|
||||
char level = Dialogs.getChar(askLevel);
|
||||
int nbrLettreMin = 4;
|
||||
int nbrLettreMax = 12;
|
||||
int nbrLettreMax = Integer.MAX_VALUE;
|
||||
String s = "";
|
||||
//String[] word = loadList("C:/Users/remi/OneDrive/Documents/Cours/05-HEVS/S1fb/informatic/labo/vscode/Labo/src/lab6/french_common_words.csv");
|
||||
String[] word = loadList("C:/Users/remi/OneDrive/Documents/Cours/05-HEVS/S1fb/informatic/labo/vscode/Labo/src/lab6/french_dictionary.txt");
|
||||
String[] word = loadList("C:/Users/remi/OneDrive/Documents/Cours/05-HEVS/S1fb/informatic/labo/vscode/Labo/src/lab6/mots.csv"); // 331'782 mots
|
||||
|
||||
switch (level) {
|
||||
case 'e':
|
||||
@ -84,7 +84,7 @@ public class WordManager {
|
||||
|
||||
case 'd':
|
||||
nbrLettreMin = 16; //9
|
||||
nbrLettreMax = 25;
|
||||
nbrLettreMax = Integer.MAX_VALUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -92,7 +92,7 @@ public class WordManager {
|
||||
}
|
||||
int lg;
|
||||
do {
|
||||
int nbr = (int)(Math.random()*200000);
|
||||
int nbr = (int)(Math.random()*word.length);
|
||||
s = word[nbr];
|
||||
lg = s.length();
|
||||
} while (lg < nbrLettreMin || lg > nbrLettreMax);
|
||||
|
1048576
src/lab6/french_common_words.csv
1048576
src/lab6/french_common_words.csv
File diff suppressed because it is too large
Load Diff
331782
src/lab6/mots.csv
Normal file
331782
src/lab6/mots.csv
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user