Class HangmanView

Object
HangmanView

public class HangmanView extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) Scanner
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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.
    void
    Prints an ASCII art String to represent the hangman with four parts on the board - the head, body, right arm, and left arm.
    getInput(String displayText)
    Displays text to console and then grabs user response.
    void
    Prints an ASCII art String to represent the hangman with one part on the board - the head.
    void
    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.
    void
    Prints an ASCII art String to represent the hangman with three parts on the board - the head, body, and right arm.
    void
    Prints an ASCII art String to represent the hangman with two parts on the board - the head and body.
    void
    Prints an ASCII art String to represent the hangman with no parts on the board.
    static void
    main(String[] args)
     
    void
    Prints a welcome screen for the Hangman game.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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

      public String getInput(String displayText)
      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

      public static void main(String[] args)