From c2997d73632a15e3cd1b623be104862e46653827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Fri, 19 Nov 2021 16:14:57 +0100 Subject: [PATCH] Co-authored-by: arnauducrey --- .vscode/launch.json | 379 +++++++++++++++++++++++++++++++++++++++++ bin/lab6/HangMan.class | Bin 4322 -> 4461 bytes src/lab6/HangMan.java | 43 ++--- 3 files changed, 401 insertions(+), 21 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..560a0cf --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,379 @@ +{ + // Utilisez IntelliSense pour en savoir plus sur les attributs possibles. + // Pointez pour afficher la description des attributs existants. + // Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "type": "java", + "name": "Launch Current File", + "request": "launch", + "mainClass": "${file}" + }, + { + "type": "java", + "name": "Launch RectangleDemoBegin", + "request": "launch", + "mainClass": "POO.T0_introduction.RectangleDemoBegin", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch dickClock", + "request": "launch", + "mainClass": "dumpThings.dickClock", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch Fuel", + "request": "launch", + "mainClass": "lab1.Fuel", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch MyProgram", + "request": "launch", + "mainClass": "lab1.MyProgram", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch RoomCalc", + "request": "launch", + "mainClass": "lab1.RoomCalc", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch sphere", + "request": "launch", + "mainClass": "lab1.sphere", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch swap", + "request": "launch", + "mainClass": "lab1.swap", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch Task1", + "request": "launch", + "mainClass": "lab2.Task1", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task2", + "request": "launch", + "mainClass": "lab2.task2", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task3", + "request": "launch", + "mainClass": "lab2.task3", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task4", + "request": "launch", + "mainClass": "lab2.task4", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task5", + "request": "launch", + "mainClass": "lab2.task5", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task6", + "request": "launch", + "mainClass": "lab2.task6", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task7", + "request": "launch", + "mainClass": "lab2.task7", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task8", + "request": "launch", + "mainClass": "lab2.task8", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch DrawArrow", + "request": "launch", + "mainClass": "lab3.DrawArrow", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch SimpleCalculator", + "request": "launch", + "mainClass": "lab3.SimpleCalculator", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task1", + "request": "launch", + "mainClass": "lab3.task1", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task4(1)", + "request": "launch", + "mainClass": "lab3.task4", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task5(1)", + "request": "launch", + "mainClass": "lab3.task5", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task6(1)", + "request": "launch", + "mainClass": "lab3.task6", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task7(1)", + "request": "launch", + "mainClass": "lab3.task7", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch DottedFlag", + "request": "launch", + "mainClass": "lab4.DottedFlag", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task1(1)", + "request": "launch", + "mainClass": "lab4.task1", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task2(1)", + "request": "launch", + "mainClass": "lab4.task2", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch task3(1)", + "request": "launch", + "mainClass": "lab4.task3", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch secretNumber", + "request": "launch", + "mainClass": "lab5.secretNumber", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch HangMan", + "request": "launch", + "mainClass": "lab6.HangMan", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch Task1(1)", + "request": "launch", + "mainClass": "lab6.Task1", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX01a", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX01a", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX01b", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX01b", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX02", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX02", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX03", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX03", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX04a", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX04a", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX04c", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX04c", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX04d", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX04d", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX07", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX07", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX08a", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX08a", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX08b", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX08b", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX08c", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX08c", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX08d", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX08d", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX08e", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX08e", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX08f", + "request": "launch", + "mainClass": "series.C05S03_loops.C05EX08f", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX01", + "request": "launch", + "mainClass": "series.C06S04_fonctions.C05EX01", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C04EX0501", + "request": "launch", + "mainClass": "series.theorie.C04EX0501", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C04EX0502", + "request": "launch", + "mainClass": "series.theorie.C04EX0502", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX01a(1)", + "request": "launch", + "mainClass": "series.theorie.C05EX01a", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX01b(1)", + "request": "launch", + "mainClass": "series.theorie.C05EX01b", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C05EX02(1)", + "request": "launch", + "mainClass": "series.theorie.C05EX02", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch C06EX06", + "request": "launch", + "mainClass": "series.theorie.C06EX06", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch L02tests", + "request": "launch", + "mainClass": "various_tests.L02tests", + "projectName": "Labo_6a2f7ad1" + }, + { + "type": "java", + "name": "Launch random", + "request": "launch", + "mainClass": "various_tests.random", + "projectName": "Labo_6a2f7ad1" + } + ] +} \ No newline at end of file diff --git a/bin/lab6/HangMan.class b/bin/lab6/HangMan.class index 19f6c16c688c3694fc4b20cc72192e11f4969095..9f4cbd10c97f584de02686ae9ff0a4f3ae99a8fc 100644 GIT binary patch delta 1438 zcmX|A`&SfY7=Au>XJ?rP*%ncj$dKY}w7^K`U>!J};|U@?fu)-eaX{DI0Y-Lb)|pv| zZe;g+(U7HSbThImDlP~~RAx!{t65QGnRc=I13GQ*u-g8x?|jemzTf*k&-Z;t7oRK= zrvDwE1aJ}l-X-{*R*FBj&y6@kyrxQ8W5~K8>2gewu2kh(UFnvkS}mN2$*O5cHClq$ zC6#5%FKY}+!HV|vlA^Y2dMsorVJR9~uSwlTSc}L~z5Q+IbKp{`U6<8x=i0Cqi)rfG z9!-xJ9Mue2z%)MK@xE2S=dlm1N`Bfp><+rV$1IN@tRnYc})jdB%D5n%0$w z^Z1itkqzxRAZ&8B9YczOp@2MavSgQ+R+y<=GB9K-!XsS)bn zKneXXMOGh$)o>$-Y^=coG}7&B!a2AGMdX=8aT!`shc?PuM@$GUxEdEwRbhHmJdA!? zxvBCIl#-A-DnVt5=RXCKBgFonqma%BPy z&E7Xgv8r@3i8s9ml4wezg-oKVgQdeODI8+MGz8|1@0*76v=;+-;uCyImifrO z&+s{Q^+P~i2hkjD=E4{FlIX9fT%^);+F?qwUG&3|qKP>2k*6ocV}Pe8g83;_BjXfE z%(O?a?_%0v6jQWia{2qQ!`kjCDEWp~8Tc08ooezEH9UqB_!YkqVqfOpaT0&Q_aC(` Bb>;v7 delta 1383 zcmY+E`EwLi6otQ+S$fhmGK^3VKn!Rqi3y~@awA$`u~-yg4IzXGGA3;pGMS0p9UyK4 z?i+6H7Er-8?hX(pkr4zJ)VMF8;)W>V`X5-1wMw?Abr=3MQ2^@nk9q#(z z$kbZJsd;3F6N^_}Y+2FHnwahAtYMf3y~^NfRwzQ2l&Fa%%n;WqRJBfu4I1ke;XFMa zO|(?iI#w*vVsJfeih$i7kL3&9XmArZD}2%BX2tNbniGtY`IoOYo1E(MWnQye4Q^wi zP`zfIo`yRN?qs8Tp;i&R+u$DVb=$P65|;-w?pKUBq1<+a)8;9VVDKOhx%;#kOS@#e z#{cyjP*`2aW**ge!t*X{6zuZYD_ciHg2y+0nTTrtlQ;IJq?E@N0lLx7h z(B#oDEJrm3|0QK7O(A=DUFa#Xlh35DPhx!*CHC#Dspw&BhJ6*jofK7MsO}~#_ITMI zYQ+!9z179w0oeYo+|kH;eN4J&Ot^DPZvU8Y!iN8{w%;22d>~Op%f43<5O_~q0bl1l_GyC!}**` zM87xvApCz5k})GjIIMfOO(5QYB@(?u3yj)LDlLnGyqqA)J!j~U@`L%zmwYAB^YjPl U_9H)YlwTy{-Q8pS#vc^@3qq$|2LJ#7 diff --git a/src/lab6/HangMan.java b/src/lab6/HangMan.java index 8eee902..fa59c07 100644 --- a/src/lab6/HangMan.java +++ b/src/lab6/HangMan.java @@ -77,6 +77,28 @@ public class HangMan { } } + + public static void main(String[] args) { + HangMan hang = new HangMan(); + hang.loadList("C:/Users/remi/OneDrive/Documents/Cours/05-HEVS/S1fb/informatic/labo/vscode/Labo/src/lab6/french_common_words.csv"); + while (true) { + hang.word.askSecretWord(); + hang.current_step = 0; + hang.updateGraphicsView(); + while (hang.play() && !hang.word.isWordComplete()) { + System.out.println(hang.word.userWord); + } + // System.out.print ("Do you want play another party ? (y/n) "); + // char answer = Input.readChar(); + char answer = Dialogs.getChar("Do you want play another party ? (y/n) "); + if (answer != 'y' && answer != 'Y') { + // System.out.println("Ok, see you later."); + Dialogs.displayMessage("Ok, see you later."); + System.exit(1); + } + } + + } public String[] loadList(String filePath) { String[] wordList; @@ -96,27 +118,6 @@ public class HangMan { return null; } } - - public static void main(String[] args) { - HangMan hang = new HangMan(); - while (true) { - hang.word.askSecretWord(); - hang.current_step = 0; - hang.updateGraphicsView(); - while (hang.play() && !hang.word.isWordComplete()) { - System.out.println(hang.word.userWord); - } - // System.out.print ("Do you want play another party ? (y/n) "); - // char answer = Input.readChar(); - char answer = Dialogs.getChar("Do you want play another party ? (y/n) "); - if (answer != 'y' && answer != 'Y') { - // System.out.println("Ok, see you later."); - Dialogs.displayMessage("Ok, see you later."); - System.exit(1); - } - } - - } } // comentaire pour le fun