Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs2-19wi
project02
Commits
0e160653
Commit
0e160653
authored
6 years ago
by
Johanna S. Karras
Browse files
Options
Download
Email Patches
Plain Diff
Update ConsoleHangmanGuesser.java
parent
0d2c8c09
jkarras
1 merge request
!6
Update ConsoleHangmanGuesser.java
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/edu/caltech/cs2/project02/guessers/ConsoleHangmanGuesser.java
+2
-4
...caltech/cs2/project02/guessers/ConsoleHangmanGuesser.java
with
2 additions
and
4 deletions
+2
-4
src/edu/caltech/cs2/project02/guessers/ConsoleHangmanGuesser.java
View file @
0e160653
...
...
@@ -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
;
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help