From a7f4c1ec9e3b4019cd02e9e08d79c8dcbfbb6b7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Sat, 20 Nov 2021 21:28:40 +0100 Subject: [PATCH] master --- bin/lab6/WordManager.class | Bin 4812 -> 4815 bytes src/lab6/WordManager.java | 9 +++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/lab6/WordManager.class b/bin/lab6/WordManager.class index 21bb9e2c4677be7ea8499a60a31f0734a3748cac..fad637c2e44013da66dc03cb04eb43f1b367fcf7 100644 GIT binary patch delta 1165 zcmYL|X>e0j6vuzJN#08y4;n+!2Exv1XNMkAzk6DSuwtQji^6f*>2tJdce5yihr762XRX5fKWj;AG8Jwyxrcl0 zJ=(Mqn{_((DJJG2k$7-XA`(k2NhQLTpzgOFdXuw5=P^5`PYFD(@QvZ-Mxx=1!d57p zFxWtaK^GfM+-$P9>c#0TV~W?NBGF)VB4M@GMv^Im&6qjpGbYb6Md6k>q1s3+?B+Rz znq^Q*kI6P}Qn-?$VavV+Bf$gx{8k7I!f4B71aRQk;~}KA+QZU~sI`mwCk=cF$3-*_x+B+iNm|eRjF0H1LK(pSC)l z2qhbGp%0q8iAO>=M&rq_!6Dw!dE36mQ>@T1Z->ERC}^%IR8|flDqWQn5_=w zu!jmKjrZML>D+{42e%Zl#vUmw)!O{74DGhtTbZt=nc1{a!&>Ij&iSn4LLOv39n{jv zLV2h~Y-BN8SVk}P^m8f0EN34}Ilu}I(?F4o&I%bG_<%{AD7!=K51>i*%eYbW>L?Ii znun+o-(}pudO0~yo4!!v*Z7 zvu+!00|e@Qul7-1F___X-~J5qG6=0*SO+S)7s&RO>Xr&1N{hUjlk`NnR5D(^jd%&+ zC(OxQMHx-Zl=C@6q;<`5TPZ6?Yau2pA+_b2bb-_asnI6oPKWbNn$L9JliCYJwSo7g zjSkVim=8H3VaqV&F*$7S9fy4?uvua$!;zJYTslgZ|3arrmrE>Qj%7Z-2|aUp}3S~scCe-8kJ@Dvio1ryGZlRob$|k-sgGW_c`Y~R(Pb) zI`nVRJ9I^EO@w=jV5h+k1^eGANT8n#!SyN7UalCN;bgZ@BmC>nJ0yh2r26wqbUO{>C{Xby)aC_Og4TrKVT1A#O< zWz)wZ$w;%;rA7DK^fMrnC6W@0=mqXs#!EJX4C!WfiD!gYOkP&x>Uwvs%jN*D>I3d- zbx?aeXB%(W%;S)r>nW%_qA+Jpn7J%n=%~#xJW{AJ97_Z(MtR5N?f+++uyy|0#$anvKk7GncWI8Xn?u9$}#jSI8@io5l37L@aDz zgljp>H5}zS-e)N}@-mjn+klUl&Ka^hB>n(~%(8^_JV+fG!f6rZayh%6TX|TJvxOC` zp;;1L(nySLvHgJ(prnxy$GDxg6)G*t=MwFKin> z>2s#o*UyWvpWzIK*cV60>VV( zB{<0zTt=p>EAY~Yj{s*8q=*|Sr6s_HtQ4n1G>HK>$rll7RMxnxXJk-$Pxw?$KNB5Wnme6!T(T-kB~*lC zTv~FSc2%l%nDVobGcKNIOa_(7sMktAN*&FbSNes}GWe3OCKbOI^&k0#UpXa_EIIp) PKln>3EtgUMuJZi{YrP&& diff --git a/src/lab6/WordManager.java b/src/lab6/WordManager.java index 7ad1c7f..1044691 100644 --- a/src/lab6/WordManager.java +++ b/src/lab6/WordManager.java @@ -61,11 +61,12 @@ public class WordManager { int nbrLettreMin = 4; int nbrLettreMax = 12; 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"); switch (level) { case 'e': - nbrLettreMin = 4; + nbrLettreMin = 0; nbrLettreMax = 6; break; @@ -76,7 +77,7 @@ public class WordManager { case 'd': nbrLettreMin = 10; - nbrLettreMax = 12; + nbrLettreMax = Integer.MAX_VALUE; break; default: @@ -84,7 +85,7 @@ public class WordManager { } int lg; do { - int nbr = (int)(Math.random()*600); + int nbr = (int)(Math.random()*200000); s = word[nbr]; lg = s.length(); } while (lg < nbrLettreMin || lg > nbrLettreMax);