Commit 0e160653 authored by Johanna S. Karras's avatar Johanna S. Karras
Browse files

Update ConsoleHangmanGuesser.java

parent 0d2c8c09
1 merge request!6Update ConsoleHangmanGuesser.java
Showing with 2 additions and 4 deletions
+2 -4
......@@ -15,10 +15,8 @@ public class ConsoleHangmanGuesser implements IHangmanGuesser {
@Override
public char getGuess(String pattern, Set<Character> guesses) {
char next;
do {
System.out.print("Your guess? ");
next = console.next().toLowerCase().charAt(0);
} while (guesses.contains(next));
System.out.print("Your guess? ");
next = console.next().charAt(0);
return next;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment