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,15 +66,15 @@ public class WordManager {
|
|||||||
askLevel += "('d' for difficult)";
|
askLevel += "('d' for difficult)";
|
||||||
char level = Dialogs.getChar(askLevel);
|
char level = Dialogs.getChar(askLevel);
|
||||||
int nbrLettreMin = 4;
|
int nbrLettreMin = 4;
|
||||||
int nbrLettreMax = 12;
|
int nbrLettreMax = Integer.MAX_VALUE;
|
||||||
String s = "";
|
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_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) {
|
switch (level) {
|
||||||
case 'e':
|
case 'e':
|
||||||
nbrLettreMin = 4;
|
nbrLettreMin = 4;
|
||||||
nbrLettreMax = 8; //5
|
nbrLettreMax = 8; //5
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'm':
|
case 'm':
|
||||||
@ -84,7 +84,7 @@ public class WordManager {
|
|||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
nbrLettreMin = 16; //9
|
nbrLettreMin = 16; //9
|
||||||
nbrLettreMax = 25;
|
nbrLettreMax = Integer.MAX_VALUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -92,7 +92,7 @@ public class WordManager {
|
|||||||
}
|
}
|
||||||
int lg;
|
int lg;
|
||||||
do {
|
do {
|
||||||
int nbr = (int)(Math.random()*200000);
|
int nbr = (int)(Math.random()*word.length);
|
||||||
s = word[nbr];
|
s = word[nbr];
|
||||||
lg = s.length();
|
lg = s.length();
|
||||||
} while (lg < nbrLettreMin || lg > nbrLettreMax);
|
} 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