Home About the Author Provide Feedback Game Development All Other Work

Hangman

These are the following images of the code that I wrote for this hangman game


We start of with the Java code and in the first few line we import the util Scanner for the user input.


We start off with the print of a greeting statement. Then we assign the boolean variable to be true. Our game is to guess the current guess of a word

We use a for loop to draw a picture of a hangman and add onto the hangman wheneverif the guess is not in the dictionary of the words that are provided. If the guess is the right, meaning the word is included in the dictionary document, then won't add onto the hangman, and will continue with the statement.