This commit is contained in:
Rémi Heredero 2021-11-20 22:04:04 +01:00
parent bbec964da6
commit cdc427d4be
4 changed files with 8 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -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 ;(");
}

View File

@ -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}]", "");