Index
All Classes and Interfaces|All Packages
C
- correctGuess(String) - Method in class HangmanGame
-
Controls functionality when user guesses a correct letter.
F
- finished - Variable in class HangmanGame
G
- getFive() - Method in class HangmanView
-
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.
- getFour() - Method in class HangmanView
-
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) - Method in class HangmanView
-
Displays text to console and then grabs user response.
- getOne() - Method in class HangmanView
-
Prints an ASCII art String to represent the hangman with one part on the board - the head.
- getSix() - Method in class HangmanView
-
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.
- getThree() - Method in class HangmanView
-
Prints an ASCII art String to represent the hangman with three parts on the board - the head, body, and right arm.
- getTwo() - Method in class HangmanView
-
Prints an ASCII art String to represent the hangman with two parts on the board - the head and body.
- getZero() - Method in class HangmanView
-
Prints an ASCII art String to represent the hangman with no parts on the board.
- guess(String) - Method in class HangmanGame
-
Controls the guessing functionality of the game.
H
- HangmanGame - Class in Unnamed Package
- HangmanGame() - Constructor for class HangmanGame
- HangmanMain - Class in Unnamed Package
- HangmanMain() - Constructor for class HangmanMain
- HangmanView - Class in Unnamed Package
- HangmanView() - Constructor for class HangmanView
I
- incorrectGuess(String) - Method in class HangmanGame
-
Controls functionality when user enters an incorrect guess.
- incorrectLetters - Variable in class HangmanGame
- initializeWords(String) - Method in class HangmanGame
-
Initializes the wordList.
M
- main(String[]) - Static method in class HangmanMain
-
For this method, you will need to: Create a new HangmanGame object Call the printScreen() method (remember how to call methods on different objects!) Use getInput("Would you like easy or hard words? ") to get user input on what difficulty they would like Call initializeWords(), passing in selectDifficulty(), which requires the input from the user you just got. Call wordSelect(). Print the initial hangman gallows by calling getZero(). Call printWordProgress() While the game is not finished, get input from the user on what letter they guess using getInput("Guess a letter: ") and call guess(), passing in the guess input.
- main(String[]) - Static method in class HangmanView
P
- printScreen() - Method in class HangmanView
-
Prints a welcome screen for the Hangman game.
- printWordProgress() - Method in class HangmanGame
-
Prints the current user's current progress in guessing the word.
S
- scanner - Variable in class HangmanView
- selectDifficulty(String) - Method in class HangmanGame
-
Selects the appropriate word list file to use for the user's selected difficulty.
V
- view - Variable in class HangmanGame
W
- word - Variable in class HangmanGame
- wordArray - Variable in class HangmanGame
- wordList - Variable in class HangmanGame
- wordSelect() - Method in class HangmanGame
-
Selects a random word from the wordList and sets the game's hangman word.
- wrongGuesses - Variable in class HangmanGame
All Classes and Interfaces|All Packages