Class TwentyQuestionsView
Object
TwentyQuestionsView
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
exitGame()
Exit the game.void
Print a message for when the player loses.void
splash()
Splash screen for the game.void
tooHigh()
Print a message for when the player's guess is too high.void
tooLow()
Print a message for when the player's guess is too low.void
welcome()
Print a message for before the game starts.void
Print a message for when the player wins.
-
Constructor Details
-
TwentyQuestionsView
public TwentyQuestionsView()
-
-
Method Details
-
splash
public void splash()Splash screen for the game. Must contain the words "Twenty Questions". A splash screen in this case is just text that is displayed while the game is launched. Have fun! -
welcome
public void welcome()Print a message for before the game starts. Feel free to change, but end with a prompt asking for the player's name. -
tooHigh
public void tooHigh()Print a message for when the player's guess is too high. -
tooLow
public void tooLow()Print a message for when the player's guess is too low. -
winnerMessage
public void winnerMessage()Print a message for when the player wins. Our example is "Your guess is correct! Congratulations!" Feel free to change! -
loserMessage
public void loserMessage()Print a message for when the player loses. Our example is "You ran out of guesses. Better luck next time!" Feel free to change! -
exitGame
public void exitGame()Exit the game. Feel free to change.
-