diff --git a/bin/lab6/HangMan.class b/bin/lab6/HangMan.class index 985a4e4..da6a604 100644 Binary files a/bin/lab6/HangMan.class and b/bin/lab6/HangMan.class differ diff --git a/bin/lab6/WordManager.class b/bin/lab6/WordManager.class index fad637c..69d0b66 100644 Binary files a/bin/lab6/WordManager.class and b/bin/lab6/WordManager.class differ diff --git a/src/lab6/HangMan.java b/src/lab6/HangMan.java index 2c23a11..8b09f74 100644 --- a/src/lab6/HangMan.java +++ b/src/lab6/HangMan.java @@ -22,7 +22,7 @@ public class HangMan { if (current_step >= MAX_STEPS) { party = false; // System.out.println("Sorry, you have lost ;( "); - Dialogs.displayMessage("Sorry, you have lost ;("); + word.lost("Sorry, you have lost ;("); } diff --git a/src/lab6/WordManager.java b/src/lab6/WordManager.java index 1044691..2f7d24f 100644 --- a/src/lab6/WordManager.java +++ b/src/lab6/WordManager.java @@ -45,6 +45,13 @@ public class WordManager { } + void lost(String msg){ + String s = msg; + s += "\n \n The good word was: "; + s += secretWord; + Dialogs.displayMessage(s); + } + public static String stripAccents(String s){ s = Normalizer.normalize(s, Normalizer.Form.NFD); s = s.replaceAll("[\\p{InCombiningDiacriticalMarks}]", "");