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

Update README.md

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