From 3547ccfc101e80fd555d6aefc91e28d5bd799ef8 Mon Sep 17 00:00:00 2001 From: brigitte Date: Wed, 8 Oct 2025 15:33:06 +0200 Subject: [PATCH] ex4 --- PenduJudeChrist/Display.class | Bin 0 -> 1608 bytes PenduJudeChrist/Display.java | 45 +- PenduJudeChrist/GameLogic.class | Bin 0 -> 690 bytes PenduJudeChrist/GameLogic.java | 25 +- PenduJudeChrist/HangedGame.java | 4 +- PenduJudeChrist/HangedGameGUI$1.class | Bin 0 -> 533 bytes PenduJudeChrist/HangedGameGUI.class | Bin 0 -> 8738 bytes PenduJudeChrist/HangedGameGUI.java | 351 ++++++------- PenduJudeChrist/InputHandler.class | Bin 0 -> 1141 bytes PenduJudeChrist/ScoreManager.class | Bin 0 -> 674 bytes PenduJudeChrist/ScoreManager.java | 22 + PenduJudeChrist/TimerManager.class | Bin 0 -> 424 bytes PenduJudeChrist/TimerManager.java | 20 + PenduJudeChrist/WordSelector.class | Bin 0 -> 2317 bytes PenduJudeChrist/WordSelector.java | 65 +-- PenduJudeChrist/motsDifficiles.txt | 87 ++++ PenduJudeChrist/motsFacile.txt | 694 ++++++++++++++++++++++++++ PenduJudeChrist/motsMoyen.txt | 110 ++++ 18 files changed, 1175 insertions(+), 248 deletions(-) create mode 100644 PenduJudeChrist/Display.class create mode 100644 PenduJudeChrist/GameLogic.class create mode 100644 PenduJudeChrist/HangedGameGUI$1.class create mode 100644 PenduJudeChrist/HangedGameGUI.class create mode 100644 PenduJudeChrist/InputHandler.class create mode 100644 PenduJudeChrist/ScoreManager.class create mode 100644 PenduJudeChrist/ScoreManager.java create mode 100644 PenduJudeChrist/TimerManager.class create mode 100644 PenduJudeChrist/TimerManager.java create mode 100644 PenduJudeChrist/WordSelector.class create mode 100644 PenduJudeChrist/motsDifficiles.txt create mode 100644 PenduJudeChrist/motsFacile.txt create mode 100644 PenduJudeChrist/motsMoyen.txt diff --git a/PenduJudeChrist/Display.class b/PenduJudeChrist/Display.class new file mode 100644 index 0000000000000000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eChrist/Display.java b/PenduJudeChrist/Display.java index b97ca36..6010176 100644 --- a/PenduJudeChrist/Display.java +++ b/PenduJudeChrist/Display.java @@ -1,43 +1,22 @@ -import java.util.Scanner; -import java.util.Random; -import java.util.HashSet; import java.util.Set; public class Display { - public static void showWord(String word, Set guessedLetters) { - System.out.print("Mot :"); - for (int i = 0; i < word.length(); i++) { - char letter = word.charAt(i); - if (guessedLetters.contains(letter)) { - System.out.print(letter + " "); - } - else { - System.out.print("_ "); + StringBuilder sb = new StringBuilder(); + for (char c : word.toCharArray()) { + if (c == ' ') { + sb.append(" "); + } else if (guessedLetters.contains(c)) { + sb.append(c).append(" "); + } else { + sb.append("_ "); } } - System.out.println(); + System.out.println(sb.toString()); } + public static void showLives(int lives, int maxLives) { - System.out.print("Vies : "); - for (int i = 0; i < lives; i++) { - System.out.print("♥︎ "); - } - System.out.println("(" + lives + "/" + maxLives + ")\n"); + System.out.println("Lives: " + lives + " / " + maxLives); } - - public static void showEndGame(String word, int lives, int maxLives){ - - if (lives <= 0) { - System.out.println(" PERDU ! "); - System.out.println(" Vous n'avez plus de vies !"); - System.out.println(" Le mot etait: " + word); - } - else { - System.out.println(" VICTOIRE ! "); - System.out.println(" Le mot était: " + word); - System.out.println(" Vies restantes: " + lives); - } - } -} \ No newline at end of file +} diff --git a/PenduJudeChrist/GameLogic.class b/PenduJudeChrist/GameLogic.class new file mode 100644 index 0000000000000000000000000000000000000000..e260f55d4cb71e24c14a7545962d26405e153e97 GIT binary patch literal 690 zcmX^0Z`VEs1_pBm4K4l|poS%})$iVNDnV0HUnwykb6q1;flgh}zn^_#5UzFlrnp#|(n!?DSqT!R3 zSeB@tlbDyTA6!zDnU`)25h*Rn%+U`{EwR>&Vr1YAE=f$z_Dw8+8p9c!nVy$eQd*SC z$Y4#-2pforU^|>M5{nX(OHzxh?Z75;1?QI*C8xS&f?UVvo|v2Jlb@cMtOs%x4+94S zCp&{I4}%*am>3vAzGYx!;9_84 zkY!+GU}RumVAa~rz_^itfq{{Mn}LCW4J^pUz{$YFz{|h{R$9ft#K6M9z+k{^E2FiI zfoTzgx|Yl~24*{10fhw&Y|9yhv}JcNu4_QV*JA(#`ueY U?-v6r13%ad0R~0}K`=`Q0PEV9I{*Lx literal 0 HcmV?d00001 diff --git a/PenduJudeChrist/GameLogic.java b/PenduJudeChrist/GameLogic.java index 050af89..1d1327b 100644 --- a/PenduJudeChrist/GameLogic.java +++ b/PenduJudeChrist/GameLogic.java @@ -1,21 +1,22 @@ -import java.util.Scanner; -import java.util.Random; -import java.util.HashSet; import java.util.Set; - - - +/** + * Classe contenant la logique de vérification du jeu. + */ public class GameLogic { - - public static boolean isWordGuessed(String word, Set guessedLetters){ - - for (int i = 0; i < word.length(); i++ ) { - if(!guessedLetters.contains(word.charAt(i))) { + /** + * Vérifie si toutes les lettres (hors espaces) du mot ont été devinées. + */ + public static boolean isWordGuessed(String word, Set guessedLetters) { + for (int i = 0; i < word.length(); i++) { + char c = word.charAt(i); + if (c == ' ') { + continue; // espace dans le mot + } + if (!guessedLetters.contains(c)) { return false; } } return true; } } - diff --git a/PenduJudeChrist/HangedGame.java b/PenduJudeChrist/HangedGame.java index 879433a..f7e7b68 100644 --- a/PenduJudeChrist/HangedGame.java +++ b/PenduJudeChrist/HangedGame.java @@ -1,4 +1,4 @@ -import java.util.Scanner; +/*import java.util.Scanner; import java.util.Random; import java.util.HashSet; import java.util.Set; @@ -36,4 +36,4 @@ public class HangedGame { Display.showEndGame(word, lives, MAX_LIVES); scanner.close(); } -} \ No newline at end of file +}*/ \ No newline at end of file diff --git a/PenduJudeChrist/HangedGameGUI$1.class b/PenduJudeChrist/HangedGameGUI$1.class new file mode 100644 index 0000000000000000000000000000000000000000..d08cc58e21a128ee3cfe53d70c640f9bd9f27b7f GIT binary patch literal 533 zcmX^0Z`VEs1_pBm1x^N522m~sHU=>eAl|poS%{k(w3Q*>Q|bZlv)&$n3R*s z$iP>Sn3-4NoS$2epO>0f!pI<|;ggkEmZ+atUZU?_lv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)HxzX=`;Z*hBI(eK}|tWoO5dlv2SIt(%Qx_1z|R%><(aHV+ds6Vh9po z0(Hrtb|7hF#i7xMfsMhJfs4UUfC<#0!_>%xL!$=+8-phU7lRiA3&VME>2rbMA_D^h z3j-sAC&M%b1_mJpCI(LiFkpPj_=@ovgCrxU4I9J2&B(&Q%*e{f#>fg~al%<#jI4~H f0GBs}$~%JPBf(@GSXDY>24gw^R^a>V literal 0 HcmV?d00001 diff --git a/PenduJudeChrist/HangedGameGUI.java b/PenduJudeChrist/HangedGameGUI.java index d462317..c35c335 100644 --- a/PenduJudeChrist/HangedGameGUI.java +++ b/PenduJudeChrist/HangedGameGUI.java @@ -1,20 +1,24 @@ import javax.swing.*; import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.HashSet; +import java.awt.event.*; import java.util.Set; +import java.util.HashSet; public class HangedGameGUI { private static final int MAX_LIVES = 12; - - private String word; + + // Game variables + private String word; private Set guessedLetters; private int lives; - - - // Composants de l'interface - private JFrame frame; + private String difficulty; // "easy", "medium", "hard" + + // Timer and scoring + private TimerManager timerManager; + + // GUI components + private JFrame frameMenu; + private JFrame frameGame; private JLabel wordLabel; private JLabel livesLabel; private JLabel messageLabel; @@ -22,38 +26,96 @@ public class HangedGameGUI { private JButton guessButton; private JPanel hangmanPanel; + private JButton easyButton; + private JButton mediumButton; + private JButton hardButton; + public HangedGameGUI() { - word = WordSelector.pickRandomWord(); + WordSelector.loadWordsForDifficulty("easy", "motsFacile.txt"); + WordSelector.loadWordsForDifficulty("medium", "motsMoyen.txt"); + WordSelector.loadWordsForDifficulty("hard", "motsDifficiles.txt"); + guessedLetters = new HashSet<>(); lives = MAX_LIVES; - - initializeGUI(); + timerManager = new TimerManager(); + + initializeMenuGUI(); } - private void initializeGUI() { - frame = new JFrame("Jeu du Pendu"); - frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - frame.setLayout(new BorderLayout()); - frame.setSize(500, 400); - - // Panel du haut - Affichage du mot et des vies + private void initializeMenuGUI() { + frameMenu = new JFrame("Jeu du Pendu — Choix de difficulté"); + frameMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frameMenu.setSize(400, 200); + frameMenu.setLayout(new BorderLayout()); + + JLabel prompt = new JLabel("Sélectionnez une difficulté :", JLabel.CENTER); + prompt.setFont(new Font("Arial", Font.BOLD, 16)); + frameMenu.add(prompt, BorderLayout.NORTH); + + JPanel buttonPanel = new JPanel(new GridLayout(3, 1, 5, 5)); + easyButton = new JButton("Easy"); + mediumButton = new JButton("Medium"); + hardButton = new JButton("Hard"); + buttonPanel.add(easyButton); + buttonPanel.add(mediumButton); + buttonPanel.add(hardButton); + frameMenu.add(buttonPanel, BorderLayout.CENTER); + + setupMenuEvents(); + + frameMenu.setLocationRelativeTo(null); + frameMenu.setVisible(true); + } + + private void setupMenuEvents() { + easyButton.addActionListener(e -> { + difficulty = "easy"; + startNewGame(); + }); + mediumButton.addActionListener(e -> { + difficulty = "medium"; + startNewGame(); + }); + hardButton.addActionListener(e -> { + difficulty = "hard"; + startNewGame(); + }); + } + + private void startNewGame() { + frameMenu.setVisible(false); + + guessedLetters.clear(); + lives = MAX_LIVES; + + word = WordSelector.pickWord(difficulty); + + initializeGameGUI(); + + timerManager.start(); + } + + private void initializeGameGUI() { + frameGame = new JFrame("Jeu du Pendu — " + difficulty); + frameGame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frameGame.setSize(600, 400); + frameGame.setLayout(new BorderLayout()); + JPanel topPanel = new JPanel(new GridLayout(3, 1)); - wordLabel = new JLabel("", JLabel.CENTER); wordLabel.setFont(new Font("Arial", Font.BOLD, 24)); updateWordDisplay(); - - livesLabel = new JLabel("Vies: " + lives + "/" + MAX_LIVES, JLabel.CENTER); + + livesLabel = new JLabel("Lives: " + lives + " / " + MAX_LIVES, JLabel.CENTER); livesLabel.setFont(new Font("Arial", Font.PLAIN, 16)); - + messageLabel = new JLabel("Devinez le mot !", JLabel.CENTER); messageLabel.setFont(new Font("Arial", Font.ITALIC, 14)); - + topPanel.add(wordLabel); topPanel.add(livesLabel); topPanel.add(messageLabel); - - // Panel du pendu (visuel simple) + hangmanPanel = new JPanel() { @Override protected void paintComponent(Graphics g) { @@ -61,189 +123,134 @@ public class HangedGameGUI { drawHangman(g); } }; - hangmanPanel.setPreferredSize(new Dimension(200, 200)); + hangmanPanel.setPreferredSize(new Dimension(300, 300)); hangmanPanel.setBackground(Color.WHITE); - - // Panel de saisie - JPanel inputPanel = new JPanel(); - inputPanel.setLayout(new FlowLayout()); - - JLabel inputLabel = new JLabel("Entrez une lettre:"); + + JPanel inputPanel = new JPanel(new FlowLayout()); + JLabel inputLabel = new JLabel("Enter a letter:"); letterField = new JTextField(2); letterField.setFont(new Font("Arial", Font.BOLD, 18)); - - guessButton = new JButton("Deviner"); - + guessButton = new JButton("Guess"); + inputPanel.add(inputLabel); inputPanel.add(letterField); inputPanel.add(guessButton); - - // Ajout des composants à la fenêtre - frame.add(topPanel, BorderLayout.NORTH); - frame.add(hangmanPanel, BorderLayout.CENTER); - frame.add(inputPanel, BorderLayout.SOUTH); - - // Gestion des événements - setupEventHandlers(); - - frame.setVisible(true); + + frameGame.add(topPanel, BorderLayout.NORTH); + frameGame.add(hangmanPanel, BorderLayout.CENTER); + frameGame.add(inputPanel, BorderLayout.SOUTH); + + setupGameEvents(); + + frameGame.setLocationRelativeTo(null); + frameGame.setVisible(true); } - - private void drawHangman(Graphics g) { - int errors = MAX_LIVES - lives; - g.setColor(Color.BLACK); - - // Base - if (errors >= 1) g.drawLine(50, 150, 100, 150); - // Poteau - if (errors >= 2) g.drawLine(75, 150, 75, 50); - // Traverse - if (errors >= 3) g.drawLine(75, 50, 125, 50); - // Corde - if (errors >= 4) g.drawLine(125, 50, 125, 70); - // Tête - if (errors >= 5) g.drawOval(120, 70, 10, 10); - // Corps - if (errors >= 6) g.drawLine(125, 80, 125, 110); - // Bras gauche - if (errors >= 7) g.drawLine(125, 85, 115, 95); - // Bras droit - if (errors >= 8) g.drawLine(125, 85, 135, 95); - // Jambe gauche - if (errors >= 9) g.drawLine(125, 110, 115, 125); - // Jambe droite - if (errors >= 10) g.drawLine(125, 110, 135, 125); - // Visage triste - if (errors >= 11) { - g.drawArc(122, 73, 3, 3, 0, 180); // œil gauche - g.drawArc(127, 73, 3, 3, 0, 180); // œil droit - g.drawArc(122, 78, 6, 3, 0, -180); // bouche - } + + private void setupGameEvents() { + guessButton.addActionListener(e -> processGuess()); + letterField.addActionListener(e -> processGuess()); } - - private void updateWordDisplay() { - StringBuilder display = new StringBuilder(); - for (int i = 0; i < word.length(); i++) { - char letter = word.charAt(i); - if (guessedLetters.contains(letter)) { - display.append(letter).append(" "); - } else { - display.append("_ "); - } - } - wordLabel.setText(display.toString()); - } - - private void setupEventHandlers() { - // Bouton deviner - guessButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - processGuess(); - } - }); - - // Entrée dans le champ texte - letterField.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - processGuess(); - } - }); - } - + private void processGuess() { String input = letterField.getText().toLowerCase().trim(); letterField.setText(""); - + if (input.length() != 1 || !Character.isLetter(input.charAt(0))) { - messageLabel.setText("Veuillez entrer une seule lettre !"); + messageLabel.setText("Please enter a single letter."); return; } - + char letter = input.charAt(0); - if (guessedLetters.contains(letter)) { - messageLabel.setText("Vous avez déjà essayé cette lettre !"); + messageLabel.setText("You already guessed that letter."); return; } - + guessedLetters.add(letter); - + if (!word.contains(String.valueOf(letter))) { lives--; - messageLabel.setText("Mauvaise lettre ! Il vous reste " + lives + " vies."); + messageLabel.setText("Wrong letter! Lives left: " + lives); } else { - messageLabel.setText("Bonne lettre ! Continuez !"); + messageLabel.setText("Good guess!"); } - + updateWordDisplay(); - livesLabel.setText("Vies: " + lives + "/" + MAX_LIVES); + livesLabel.setText("Lives: " + lives + " / " + MAX_LIVES); hangmanPanel.repaint(); - - checkGameStatus(); + + checkGameEnd(); } - - private void checkGameStatus() { - if (lives <= 0) { - endGame(false); - } else if (GameLogic.isWordGuessed(word, guessedLetters)) { - endGame(true); + + private void updateWordDisplay() { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < word.length(); i++) { + char c = word.charAt(i); + if (c == ' ') { + sb.append(" "); + } else if (guessedLetters.contains(c)) { + sb.append(c).append(" "); + } else { + sb.append("_ "); + } + } + wordLabel.setText(sb.toString()); + } + + private void drawHangman(Graphics g) { + int errors = MAX_LIVES - lives; + g.setColor(Color.BLACK); + if (errors >= 1) g.drawLine(50, 250, 150, 250); + if (errors >= 2) g.drawLine(100, 250, 100, 50); + if (errors >= 3) g.drawLine(100, 50, 200, 50); + if (errors >= 4) g.drawLine(200, 50, 200, 80); + if (errors >= 5) g.drawOval(185, 80, 30, 30); + if (errors >= 6) g.drawLine(200, 110, 200, 160); + if (errors >= 7) g.drawLine(200, 120, 180, 140); + if (errors >= 8) g.drawLine(200, 120, 220, 140); + if (errors >= 9) g.drawLine(200, 160, 180, 190); + if (errors >= 10) g.drawLine(200, 160, 220, 190); + if (errors >= 11) { + g.drawArc(190, 90, 5, 5, 0, 180); + g.drawArc(205, 90, 5, 5, 0, 180); + g.drawArc(190, 105, 15, 8, 0, -180); } } - + + private void checkGameEnd() { + boolean won = GameLogic.isWordGuessed(word, guessedLetters); + if (lives <= 0 || won) { + endGame(won); + } + } + private void endGame(boolean won) { guessButton.setEnabled(false); letterField.setEnabled(false); - + + long elapsedMillis = timerManager.getElapsedTimeMillis(); + int errors = MAX_LIVES - lives; + int score = ScoreManager.calculateScore(errors, elapsedMillis, difficulty); + + String message; if (won) { - messageLabel.setText("VICTOIRE ! Le mot était: " + word); - JOptionPane.showMessageDialog(frame, - "Félicitations ! Vous avez gagné !\n" + - "Le mot était: " + word + "\n" + - "Vies restantes: " + lives, - "Victoire !", - JOptionPane.INFORMATION_MESSAGE); + message = "You win! Word: " + word + "\nLives left: " + lives + "\nScore: " + score; + JOptionPane.showMessageDialog(frameGame, message, "Victory", JOptionPane.INFORMATION_MESSAGE); } else { - messageLabel.setText("PERDU ! Le mot était: " + word); - JOptionPane.showMessageDialog(frame, - "Désolé ! Vous avez perdu !\n" + - "Le mot était: " + word, - "Défaite", - JOptionPane.ERROR_MESSAGE); + message = "You lose! Word: " + word + "\nScore: " + score; + JOptionPane.showMessageDialog(frameGame, message, "Defeat", JOptionPane.ERROR_MESSAGE); } - - // Bouton pour rejouer - int choice = JOptionPane.showConfirmDialog(frame, - "Voulez-vous rejouer ?", - "Nouvelle partie", - JOptionPane.YES_NO_OPTION); - + + int choice = JOptionPane.showConfirmDialog(frameGame, "Play again?", "Replay", JOptionPane.YES_NO_OPTION); if (choice == JOptionPane.YES_OPTION) { - restartGame(); + frameGame.dispose(); + frameMenu.setVisible(true); + } else { + System.exit(0); } } - - private void restartGame() { - word = WordSelector.pickRandomWord(); - guessedLetters.clear(); - lives = MAX_LIVES; - - guessButton.setEnabled(true); - letterField.setEnabled(true); - - updateWordDisplay(); - livesLabel.setText("Vies: " + lives + "/" + MAX_LIVES); - messageLabel.setText("Nouvelle partie - Devinez le mot !"); - hangmanPanel.repaint(); - } public static void main(String[] args) { - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - new HangedGameGUI(); - } - }); + SwingUtilities.invokeLater(HangedGameGUI::new); } -} \ No newline at end of file +} diff --git a/PenduJudeChrist/InputHandler.class b/PenduJudeChrist/InputHandler.class new file mode 100644 index 0000000000000000000000000000000000000000..220fab2d52596261c46f70349a9154795334f60a GIT binary patch literal 1141 zcmX^0Z`VEs1_pBmUoHkg1_e$AMFu4f24yY=6$Vu<1}O$LE(S>kbr7KeA~ZpS78ipy zgANCSE=ZLgh@;QVAkARF!C=VFV8qT~%*eoIlbM%UV#mn9tf3jk$iU*9pOVVR!0(fp zm+DuVo0M7n zBZIJOUP)1El|pG=szOd`Nl8(vl>$416%T_ogAEUZErT5ogFT3F01=K1PCN|G3@+>p zt~?BG4DO5!%3-OcnK?PBRSKyfbBe&`6sMNvz)Vw6RN!Io0GZ{<;Kjq>&EUhxpb?f| zTC9**mRhBda(HFd;ROn*#l?x0hgT{jgTfQ)4h2O8Mg|^a_cJmGfPA12_O^dgR%&ty zicoM#QD$B`BZDAV6>?lKGVmgarJ`x8EG|jSWn^H^FD+qY5QPM7X1;zvQD$CAa7j^W zVy-nKgD}_tRAEL2)&h_sMg~!6oPnJNafdZ1^>E~+R+NB}4kLqzh9<;lWHpQo+$H%w z`Q@oa&WXjTj0`L#MVYyb3~V{6dFdq?;56vT$iSAIkyzwd!pOj);R#Ac5VwHMfyX{0 z14m{tEIqPlIBP~RGO&YPmy^fHz+RS^Q=00Z#>gO{;f(AKxPEI!29D(XypqJsyka!} zK!Vy@Gm1fxL4ZM!0R)&B7(oe%fssLkfq_Amfsuicfq{WlYdZtuMg|53Mg~y^1_m~; zAUgvmgBXK20~1*38U`i?76t}}z)cKHLd@G3ShTh=ux?{u+s44|r@M`TgJl5&pDyz@ z2F@J}T(cPXK&rU6G4L$^e+evVt1YvGfp;eZ9}~k&h%7%?c8km!1_lNuu(etYTnr2h zJPaHRybQt&{0wRg0t|W#f((WXq73E?Vhk<};tW0v5)A$fvJ4Uo3=EPCEDV1cR2kSA dB)R@G$TBdqGf1&BNP|2i12z=oJvlH-9snqy56J)k literal 0 HcmV?d00001 diff --git a/PenduJudeChrist/ScoreManager.class b/PenduJudeChrist/ScoreManager.class new file mode 100644 index 0000000000000000000000000000000000000000..a1f7012a2671d6663121f1ea28ec8be8c485f743 GIT binary patch literal 674 zcmX^0Z`VEs1_pBmB`yXo22m~sAqFuH25}HA!NDNO!63!T00zu2*cqhR8Dtn4*laTM zGE3|j8JIOR!x$M@obyvs85#I}GV@aXN^_G^i$W5Ua#9%?_>vQIl1p zK}HFJP4G?3OH5BK(gPX6!@$kJ!^0rQAkWCa;+j}o$-|()pvcI;=9`+5S(?kpz~Yfu zl)}isgRGO0K>(x|V!eM-R%&tyiV(y_j0_wZiNzTZZ!v3t+{cz$Selqq%*Y_Bf#d;* z3D%lX42le#3|!z~Vq#zfxr~94ftP`SL6(7$fsuiMfmLfe1LH;p1_nk3J_ZH`Hn1Qg z11AGNg8)P+BOe0`0|x^G!)jeCRwgqxN!D!)Osg3f82lI*7??YitEVzBFc>l@+)!d* zU{GXGGUaAqU~rUV6=L4Tz%r9TjoFNCIfH^Es}L)gFUA7m3rMmGv4Qz)tY&PYY^xX; z7&O4nWME)oU|^7BU|^7AU|>)dWPV}BBFK8jj75e+Cr>c19ME2qPmX$QT)f!N!XK E0Ir00XaE2J literal 0 HcmV?d00001 diff --git a/PenduJudeChrist/ScoreManager.java b/PenduJudeChrist/ScoreManager.java new file mode 100644 index 0000000..2407217 --- /dev/null +++ b/PenduJudeChrist/ScoreManager.java @@ -0,0 +1,22 @@ +public class ScoreManager { + /** + * Calcule le score selon le nombre d’erreurs (errors), le temps écoulé en ms, et la difficulté. + * Score de base dépend de la difficulté, puis on pénalise par erreurs et temps. + */ + public static int calculateScore(int errors, long elapsedMillis, String difficulty) { + int base; + switch (difficulty) { + case "Easy" : base = 1000; + case "Medium" :base = 1500; + case "Hard" : base = 2000; + default : base = 1000; + } + + int errorPenalty = errors * 100; + int timePenalty = (int)(elapsedMillis / 1000); // en secondes + + int score = base - errorPenalty - timePenalty; + if (score < 0) score = 0; + return score; + } +} diff --git a/PenduJudeChrist/TimerManager.class b/PenduJudeChrist/TimerManager.class new file mode 100644 index 0000000000000000000000000000000000000000..c2f43e14560634f9b06e9a3f0141203646e041df GIT binary patch literal 424 zcmX^0Z`VEs1_pBmNiGIf20<Pq|~C2#H5^5Mg~@}Zbk-? z^wbj9oWz3S)D&c+m^C!L7#X;N^Gl18Q{6H_Is`%TMZSr7iRr0DdRd8Oi98G(44mu? z;yerz417EcYz*v-3_QrH7#RdW>hyCG^V0SGld@8iOHhP@D~n4~a~T-~lS_+=QuB~J z!=T8(!obSFz`)4B1TvU`fq|KU5o8|&BLf!$1A{CBBLgD?0|Tqpb_T|cV1?Wa3=C{w zK^6u^1|9}Zs8SWMRt5$RtsM+ZTN#)Us<{}L7#JA18Q2+k7#JCN8Tg<&K$e3H=iI@- Yq_u^CIdv_X1wssr4EziX3``6H0FDn!WB>pF literal 0 HcmV?d00001 diff --git a/PenduJudeChrist/TimerManager.java b/PenduJudeChrist/TimerManager.java new file mode 100644 index 0000000..dee84f2 --- /dev/null +++ b/PenduJudeChrist/TimerManager.java @@ -0,0 +1,20 @@ +/** + * Classe simple pour gérer le chronomètre. + */ +public class TimerManager { + private long startTimeMillis; + + /** + * Démarre le chronomètre. + */ + public void start() { + startTimeMillis = System.currentTimeMillis(); + } + + /** + * Retourne le temps écoulé en millisecondes depuis le démarrage. + */ + public long getElapsedTimeMillis() { + return System.currentTimeMillis() - startTimeMillis; + } +} diff --git a/PenduJudeChrist/WordSelector.class b/PenduJudeChrist/WordSelector.class new file mode 100644 index 0000000000000000000000000000000000000000..565bb724c6ac52d6f1cef2de85ae2cb40086270b GIT binary patch literal 2317 zcmX^0Z`VEs1_pD6RxSn=22*whGcE=u5N*!RV8O+}%3#UGz`|e!BCNR>6c}tkge{1$ z<7SXxum?#vuroMvG4L@su`@VxGPp3f3NbJ+cycj#F?e$^2r&3?GAJ|nax?fb_=AW5 zc7{NZRyz)cAa;geE(U1^QxHD{#0mwm!q^$Y*%>0Z7!*MciDYMpVq_33&o4?TcB*vA zOiRm5F3l;aWMts?$x19s)GsZ`%+dEvEU;!|;0(@8&r2*RElOo%a7UH3fpBvY^V0Q$ zONuh{(ybvPVC_Dc#U)r&*jd|IGcvH*Waed-*fBCNYiNcsGO#%3r=)^x&&*5pE6q(x zEec6Y%1LEp5X;F=ObG|M(=ERU*`ewh5UVgPM-~B@%^O^jn4ImKSO7JWqaZUm8)PIS zgBlh?G%?L(WZ%QjC^^+F6XZNWkU7DrIjPAd`9*r5pyOfCWYA({5C*X! z!RT02lvoK03`PbquxMt!zEf#hT53^hN>FNIN@@`!gAhytWGqAwWKcASh~Z&~Wr*Wp zhzAh~AR>_=iH9MXA%%w_6=4_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..454ffaf 100644 --- a/PenduJudeChrist/WordSelector.java +++ b/PenduJudeChrist/WordSelector.java @@ -1,33 +1,40 @@ -import java.util.Scanner; -import java.util.Random; -import java.util.HashSet; -import java.util.Set; +import java.io.*; +import java.util.*; public class WordSelector { - private static final String[] WORDS = { - "java", "python", "programmation", "ordinateur", "clavier", - "souris", "ecran", "internet", "logiciel", "algorithme", - "maison", "jardin", "livre", "table", "chaise", "porte", - "fenetre", "lampe", "bureau", "stylo", "crayon", "papier", - "fleur", "arbre", "oiseau", "chat", "chien", "poisson", - "soleil", "lune", "etoile", "ciel", "nuage", "pluie", - "vent", "neige", "terre", "eau", "feu", "air", "pierre", - "sable", "route", "ville", "rue", "voiture", "velo", - "train", "avion", "bateau", "musique", "chanson", "danse", - "peinture", "couleur", "forme", "image", "photo", "film", - "histoire", "conte", "reve", "idee", "pensee", "mot", - "phrase", "texte", "histoire", "nombre", "chiffre", - "calcul", "probleme", "solution", "question", "reponse", - "temps", "heure", "minute", "seconde", "jour", "nuit", - "matin", "soir", "semaine", "mois", "annee", "saison", - "printemps", "ete", "automne", "hiver", "famille", "ami", - "frere", "soeur", "parent", "enfant", "ecole", "classe", - "cours", "lecon", "devoir", "travail", "repos", "jeu" - }; - - public static String pickRandomWord(){ - Random random = new Random(); - return WORDS[random.nextInt(WORDS.length)]; + private static final Map> wordsByDifficulty = new HashMap<>(); + + /** + * Charge la liste de mots pour une difficulté donnée depuis un fichier. + */ + public static void loadWordsForDifficulty(String difficulty, String filename) { + List words = new ArrayList<>(); + try (BufferedReader reader = new BufferedReader(new FileReader(filename))) { + String line; + while ((line = reader.readLine()) != null) { + String word = line.trim().toLowerCase(); + if (!word.isEmpty()) { + words.add(word); + } + } + } catch (IOException e) { + System.err.println("Error loading words from " + filename); + e.printStackTrace(); + } + wordsByDifficulty.put(difficulty.toLowerCase(), words); } -} \ No newline at end of file + + /** + * Retourne un mot aléatoire selon la difficulté ("easy", "medium", "hard"). + * Retourne "default" si aucun mot trouvé. + */ + public static String pickWord(String difficulty) { + List words = wordsByDifficulty.get(difficulty.toLowerCase()); + if (words == null || words.isEmpty()) { + return "default"; + } + Random rand = new Random(); + return words.get(rand.nextInt(words.size())); + } +} diff --git a/PenduJudeChrist/motsDifficiles.txt b/PenduJudeChrist/motsDifficiles.txt new file mode 100644 index 0000000..4748107 --- /dev/null +++ b/PenduJudeChrist/motsDifficiles.txt @@ -0,0 +1,87 @@ +petit chat +grand arbre +voiture rouge +soleil brillant +fleur jaune +eau claire +montagne haute +ciel bleu +oiseau chanteur +jardin secret +livre ancien +musique douce +temps froid +rue calme +pont vieux +chien fidèle +nuit noire +lune pleine +feu rapide +vent fort +mer agitée +plage dorée +neige blanche +herbe verte +clé perdue +main droite +pied gauche +nez fin +main froide +jour gris +fête joyeuse +rire franc +sac lourd +boue épaisse +seau plein +bête sauvage +chaton joueur +fromage frais +café noir +bois dur +miel doux +âne têtu +nager vite +jouet cassé +roi puissant +reine belle +vase fragile +fleur fanée +voix douce +temps perdu +sable chaud +neuf brillant +souris rapide +pont solide +coeur tendre +lait frais +pied nu +faux plat +rare gemme +tôt matin +lent pas +fin courte +rue étroite +rose rouge +arête dure +doux parfum +sec désert +haut sommet +bas fond +lent mouvement +fer solide +vers libre +vent froid +sel fin +sou dur +rat gris +vin rouge +oui clair +non net +jus sucré +riz blanc +sel épais +jeu amusant +air frais +eau pure +sol dur +feu vif \ No newline at end of file diff --git a/PenduJudeChrist/motsFacile.txt b/PenduJudeChrist/motsFacile.txt new file mode 100644 index 0000000..0f00c60 --- /dev/null +++ b/PenduJudeChrist/motsFacile.txt @@ -0,0 +1,694 @@ +abandon +abeille +abricot +accident +actrice +admirer +adorer +adresse +aérien +affiche +agencer +agir +aide +aigle +aimer +alarme +album +alcool +aligner +aller +allumer +alphabet +ami +amour +ananas +ancien +ancre +ange +animal +année +annoncer +antique +appareil +appel +apprendre +appui +arc +arbre +argent +arme +armoire +arracher +arriver +art +article +ascenseur +asile +aspect +assis +astuce +atelier +attaque +attendre +attraper +auberge +audace +auguste +aurore +auteur +automne +avancer +avenir +averse +avis +avion +avocat +avoir +bagage +bagarre +bague +bain +bal +balcon +balle +bambou +banane +banc +barbe +barrière +base +bateau +beau +beauté +bébé +besoin +bibliothèque +bicyclette +bien +bijou +billet +bise +blague +blanc +blessure +bleu +bloc +boire +bois +boîte +bon +bonbon +bondir +bonjour +bord +bouche +bougie +boulanger +boule +bouton +branche +bras +brave +briller +bruit +bureau +cabane +cabinet +cadeau +café +cage +cahier +caillou +calcul +calme +camion +campagne +canard +canne +capable +caprice +car +caractère +carotte +carte +cas +cascade +casser +casserole +cause +cave +ceinture +cerise +cerveau +chaîne +chair +chaise +chance +chanson +chant +chanter +chapeau +chaque +charme +chat +chaud +chauffage +chaussette +chaussure +chef +chemin +chemise +cher +chercher +cheval +cheveu +chien +chiffre +choisir +chose +ciel +cigogne +cimetière +cinéma +cinq +circuit +clair +classe +clavier +clé +client +climat +cloche +coeur +coiffeur +colère +colis +colline +colorer +coltiner +combat +comédie +commencer +commerçant +compagnie +compliment +comprendre +compte +comté +concours +condition +confiance +congé +connaître +conte +content +continuer +contracter +copain +copie +corail +corde +corps +correct +côte +coucher +coude +couleur +coup +courage +courant +courir +course +court +cousin +couteau +coutume +couvert +couvrir +crayon +créer +crème +cri +crier +croire +croix +cru +cube +cuiller +cuisine +cuivre +culotte +curieux +cycle +danger +danse +danser +date +davantage +début +décider +décrire +défaut +degré +demander +demeure +dent +dents +départ +depuis +dernier +descendre +désirer +dessin +dessiner +détail +dette +deux +devoir +diamant +dieu +dîner +dire +direct +direction +discours +discuter +dissimuler +docteur +doigt +domaine +domicile +don +donner +dormir +dos +douceur +doute +drapeau +dresser +droit +dur +durée +eau +école +écrire +écume +écurie +effacer +effet +égal +église +élève +élever +éloigner +emballer +embrasser +émerger +émotion +empêcher +emporter +enfant +enfer +enfin +engager +énigme +ensemble +entendre +entrer +enveloppe +envie +envoyer +épaule +épargne +épatant +épée +épice +époque +équilibre +erreur +escalier +escargot +espace +espoir +esprit +essai +essayer +essence +estime +étage +état +été +étoile +étrange +étroit +étude +eu +euro +éveil +événement +éviter +exact +examen +excuser +exemple +exister +expliquer +explorer +exprès +face +facile +facteur +faible +faillir +faire +fait +falaise +famille +familiarité +farine +faucon +faute +faux +favori +féliciter +fer +fermer +fête +feu +feuille +fidèle +fier +figure +film +fin +fixer +flamme +fleur +flocon +folie +fond +force +forêt +forme +fort +fou +frais +frapper +frère +froid +fruit +fumée +funambule +fusil +futur +gagner +galerie +garder +gare +gâteau +gauche +geler +gendarme +génial +geste +géant +gilet +girafe +glace +gloire +gomme +goût +gouverner +grain +grand +gratuit +grave +grimper +gris +grotte +groupe +grue +gueule +guitare +habile +habiter +habituel +haie +haine +halte +hamac +harmonie +hasard +haut +hélice +histoire +hiver +homme +honneur +horrible +hors +hôte +heure +humain +humour +hurler +idée +ignorer +image +imaginer +imiter +important +impossible +incliner +inconnu +index +indiquer +informer +ingénieur +initier +inonder +insecte +installer +instant +institut +intelligent +intérêt +inviter +iris +isolé +ivresse +jacinthe +jambon +jardin +jaser +jaune +jean +jeudi +joie +jouer +jouet +joueur +jour +journal +jubilé +juger +juillet +juin +jupe +jurer +juste +justice +là +lacet +laisser +lancer +langue +laver +lecteur +légume +lendemain +lent +lequel +lettre +libre +lien +lier +lieu +ligne +lire +livre +local +loge +logique +loin +loup +lumière +lundi +lune +lutte +machine +magasin +magie +main +maire +maison +maître +mal +malade +malheur +malin +maman +manche +manière +manquer +marchand +marcher +mari +marier +marin +marque +masque +matière +matin +maudire +mausolée +méchant +médecin +mélange +membre +mensonge +mer +merci +mercredi +merveille +message +mettre +meuble +miel +mieux +milieu +million +mine +minute +miracle +misère +mission +mode +modèle +moment +monde +montagne +monter +montrer +mort +mot +mouche +mourir +mouvement +moyen +muet +mur +muscle +musée +musique +mystère +naissance +nappe +nature +naviguer +neige +nerf +nettoyer +neuf +niveau +noir +nom +nombre +normal +noter +notre +nourrir +nouveau +nuit +numéro +objectif +obliger +obscur +observer +obtenir +occasion +océan +odeur +offrir +ombre +oncle +ongle +opinion +opposer +orage +orange +ordinaire +ordre +oreille +orgueil +orner +oser +oublier +ouvrir +outil +ouvert +ouïe +ouvrage +page +pain +paix +palais +panier +papier +parfum +parler +partager +partie +passage +passer +patience +patte +pause +payer +pays +peau +peine +peintre +pelouse +pendre +penser +perdre +père +perle +permis +personne +peser +petit +peur +photographe +phrase +pièce +pied +pierre +pire +place +plage +plaire +plan +planète +plat +pleurer +pluie +plume +poche +poids +poignard +poing +point +poire diff --git a/PenduJudeChrist/motsMoyen.txt b/PenduJudeChrist/motsMoyen.txt new file mode 100644 index 0000000..9e395df --- /dev/null +++ b/PenduJudeChrist/motsMoyen.txt @@ -0,0 +1,110 @@ +ordinateur +téléphone +bibliothèque +calendrier +aventure +document +ordinateur +musicien +ordinateur +philosophie +restaurant +chocolat +photographie +laboratoire +impression +pédagogique +température +municipale +conversation +influence +architecture +horizon +incroyable +profession +développement +expérience +recherche +université +télévision +ordinateur +démocratie +connaissance +créativité +éducation +électronique +exercice +information +intelligence +organisation +participation +présentation +recommandation +réussite +situation +stratégie +technologie +travail +valeur +véhicule +vocabulaire +vulnérable +architecture +automobile +bibliothèque +biographie +catégorie +champion +climatique +collection +communication +compétence +conférence +connaissance +construction +consultation +contribution +coordination +déclaration +démonstration +développement +différence +difficulté +diplomatie +économie +éducation +électrique +électronique +élément +émotion +entreprise +équipe +espace +essentiel +exemple +expérience +exposition +fabrication +famille +fonction +formation +génération +gestion +habitation +histoire +identité +immédiat +importance +individu +industrie +information +initiative +instruction +intégration +intérêt +introduction +investissement +invitation +journaliste +justification +langue \ No newline at end of file