Computers and Technology, 20.02.2020 02:17, jasminecoronetti44
Write a reverse Hangman game in which the user thinks of a word and the computer tries to guess the letters in that word. The user tells the computer how many letters the word contains.
Limit your program to a maximum of 6 guesses. Use a random number generator to generate the guesses. Use the following code to generate your letter guesses randomly:
// picks a letter at random that we haven't yet guessed
public static char getGuess(String guesses) {
Random r = new Random();
char guess;
do {
guess = (char)('A' + r. nextInt(26));
} while (guesses. indexOf(guess) != -1);
return guess;
}
Your program should be stored in a file called ReverseHangman. java.
Log of execution (user input underlined)
This program plays a game of reverse hangman.
You think up a word and I'll try to guess
the letters.
Answers: 3
Computers and Technology, 22.06.2019 12:40, Courtneymorris19
The most complicated four letter word
Answers: 1
Computers and Technology, 23.06.2019 20:00, emmaraeschool
Me ajude por favor , coloquei uma senha e não consigo tira-la no chorme
Answers: 2
Write a reverse Hangman game in which the user thinks of a word and the computer tries to guess the...
Social Studies, 12.03.2021 23:30
Chemistry, 12.03.2021 23:30
Biology, 12.03.2021 23:30