Skip to content
Snippets Groups Projects
Commit 3f8b4fe7 authored by joel.cavat's avatar joel.cavat
Browse files

Update README.md

parent d1cd9114
Branches
No related tags found
No related merge requests found
......@@ -288,16 +288,16 @@ Hangman h = Hangman.withSecretWord("mystere");
String currentWord = h.currentWord(); // currentWord = "_______";
h = h.tryWith('h');
int attempts = h.attempts(); // attempts = 1
int failedAttempts = h.failedAttepts(); // attempts = 1
int failedAttempts = h.failedAttempts(); // attempts = 1
currentWord = h.currentWord(); // currentWord = "_______";
h.printGallowsIfError(); // affiche la potence uniquement si le dernier essai est mauvais
h.printGallowIfError(); // affiche la potence uniquement si le dernier essai est mauvais
h = h.tryWith('s');
attempts = h.attempts(); // attempts = 2
failedAttempts = h.failedAttepts(); // attempts = 1
failedAttempts = h.failedAttempts(); // attempts = 1
currentWord = h.currentWord(); // currentWord = "____e_e";
h.printGallowsIfError();
h.printGallows(); // affiche la potence même si aucune erreur
h.printGallowIfError();
h.printGallow(); // affiche la potence même si aucune erreur
// Utilisation finale
while ( !h.isFinished() ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment