Skip to content

Latest commit

 

History

History
18 lines (18 loc) · 1.04 KB

README.md

File metadata and controls

18 lines (18 loc) · 1.04 KB

hangman_java_game

Java Project from 5/27/2017

This is a basic hangman game on Java with GUIs to assist gameplay. To play, run DriverHang.java and follow prompts as directed.

First prompt asks for preferred difficulty of word. Currently, this version allows 2 difficulty levels: "easy" and "hard." The "medium" level throws a NoSuchElementException since the text file currently does not exist. To enable, simply add a txt file with the first line being the number of words, and the desired words listed in lines after that.

The main GUI has the mystery word's blank spaces at the bottom, options to input either "Guess Letter" or "Guess Word," a bank of used and incorrect letters, and a picture of the hung stickman in question on the side. The picture of the hung stickman changes to add addition body parts as the user makes incorrect guesses, and the word bank and blank spaces update accordingly.

This game relies on JPanel. The heart of the game is PanelHang, and its file has detailed documentary on the functions.