Class HangmanView
Object
HangmanView
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetFive()Prints an ASCII art String to represent the hangman with five parts on the board - the head, body, right arm, left arm, and right leg.voidgetFour()Prints an ASCII art String to represent the hangman with four parts on the board - the head, body, right arm, and left arm.Displays text to console and then grabs user response.voidgetOne()Prints an ASCII art String to represent the hangman with one part on the board - the head.voidgetSix()Prints an ASCII art String to represent the hangman with six parts on the board - the head, body, right arm, left arm, right leg, and left leg.voidgetThree()Prints an ASCII art String to represent the hangman with three parts on the board - the head, body, and right arm.voidgetTwo()Prints an ASCII art String to represent the hangman with two parts on the board - the head and body.voidgetZero()Prints an ASCII art String to represent the hangman with no parts on the board.static voidvoidPrints a welcome screen for the Hangman game.
-
Field Details
-
scanner
Scanner scanner
-
-
Constructor Details
-
HangmanView
public HangmanView()
-
-
Method Details
-
getZero
public void getZero()Prints an ASCII art String to represent the hangman with no parts on the board. Displayed when no incorrect guesses were made. -
getOne
public void getOne()Prints an ASCII art String to represent the hangman with one part on the board - the head. Displayed when one incorrect guess was made. -
getTwo
public void getTwo()Prints an ASCII art String to represent the hangman with two parts on the board - the head and body. Displayed when two incorrect guesses were made. -
getThree
public void getThree()Prints an ASCII art String to represent the hangman with three parts on the board - the head, body, and right arm. Displayed when three incorrect guesses were made. -
getFour
public void getFour()Prints an ASCII art String to represent the hangman with four parts on the board - the head, body, right arm, and left arm. Displayed when four incorrect guesses were made. -
getFive
public void getFive()Prints an ASCII art String to represent the hangman with five parts on the board - the head, body, right arm, left arm, and right leg. Displayed when five incorrect guesses were made. -
getSix
public void getSix()Prints an ASCII art String to represent the hangman with six parts on the board - the head, body, right arm, left arm, right leg, and left leg. Displayed when six incorrect guesses were made. -
getInput
Displays text to console and then grabs user response.- Parameters:
displayText- Text to display to console.- Returns:
- String input from user
-
printScreen
public void printScreen()Prints a welcome screen for the Hangman game. -
main
-