0% found this document useful (1 vote)
924 views

Hangman Documentation

This document provides an overview of a Hangman game created using GooGooGames. It describes the game's design including: - The game contains 30 phrases divided into 5 categories that are randomly selected. - Players guess letters to reveal the hidden phrase, with incorrect guesses adding pieces to a hanging man until it is complete. - The program uses strings, arrays, and drawing functions to display the hidden phrase, guesses, and hanging man graphics. - Key challenges included adding replay ability and improving the graphical user interface.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
924 views

Hangman Documentation

This document provides an overview of a Hangman game created using GooGooGames. It describes the game's design including: - The game contains 30 phrases divided into 5 categories that are randomly selected. - Players guess letters to reveal the hidden phrase, with incorrect guesses adding pieces to a hanging man until it is complete. - The program uses strings, arrays, and drawing functions to display the hidden phrase, guesses, and hanging man graphics. - Key challenges included adding replay ability and improving the graphical user interface.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Angela Roscioli

Mike Worth
Instruction Manual
For our final project, we have decided to create HANGMAN using GooGooGames. It is a typical
game of hangman. Our version of HANGMAN contains 30 phrases divided into 5 categories. First, the
user must click in the gameplay window. The user then selects a category and then the phrase is randomly
selected based on the category. The randomly selected phrase is displayed with each letter of the phrase
blocked out. The user selects a guess by pressing the letter they want to guess. Each time the user guesses
a letter, the computer will check to see if the letter is used anywhere in the puzzle phrase. If the letter is
used in the phrase, it will appear in the proper location and the letter blocking disappears. If the letter is
not in the phrase, a piece of a man is added to a hanging noose, until a full man appears at the end of the
rope (5 pieces per man). When the entire man hangs, the game is over and the user loses. If the user
correctly guesses the entire phrase (must be done letter by letter), the user wins. Unfortunately, the user
must also guess a space in order to win the puzzle, if a space is present in the phrase.
Design Specifications
Model
In hangman, the gallows is drawn at the very beginning of a round on the right side of the
gameplay window. We represent the man by using five chunks of drawing code (legs, body, arm, head,
total) which are altered by the function OnDraw() to show images based on gameplay failure. Each letter
in a phrase is a character in a string (currentPhrase), and these are shown when a correct letter is guessed
with OnKeyDown(). DrawString() is used to show necessary phrases to communicate pertinent gameplay
information such as correct/incorrect letters and current gameplay progress.
View
For our program, int main() contains the introduction menu where the user selects a category, and
calls checkGuess() and wrongGuess() to analyze the correctness of a players guess. checkGuess() uses a
for loop to check a users guess against every character in the currentPhrase string. If a match is found in
any of the characters, the program checks whether or not the user has already correctly guessed this letter.
If the letter guessed is not in the array, it is added. Additionally, if the guess matches one of the letters in

the string, the program will check whether or not all letters in the string have been guessed, indicating a
win and ending the game. If the letter guessed in not in the play phrase, the program calls wrongGuess()
to assess whether or not this letter has already been guessed and how many incorrect guesses have been
made (int howmanywrong). If howmanywrong is equal to or greater than five, the game ends.
DrawString() draws the letter of the current game phrase by reading the global variable currentPhrase.
currentPhrase is a string that holds the current game phrase after it is randomly selected from the phrase
array. Correct guesses are also stored in correctGuessArray, similarly to wrongGuessArray.
Control
KeyDown controls everything in this program. Guesses are registered through the keyboard.
Clicking does nothing. KeyDown contains all gameplay code including OnPlay(). Special characters and
numbers count against a user as guesses. When a user presses a key, it is saved in the variable guess and
checked against all of the letters in the current phrase.
Bugs/Design Challenges
There were a few ideas we wanted to incorporate into this project that we were not able to
incorporate. First, we wanted to have replay functionality so the user could play multiple games in a row
without restarting the program. The difficulty involved resetting all variables back to default without
getting caught up in the loops. Second, we wanted to have a graphical menu. Unfortunately, it was
difficult to develop a way to distinguish between menu state and game state. One really annoying problem
is the game window is not active when it is open, so the user must click in the game window before
making guesses. Finally, we wish we could have found a way to make uppercase and lowercase not
matter. There are articles on the internet to implement this feature; however we did not have enough time
to implement this in our final project.
What We Learned
Computer programs are mostly nested for loops/if-else statements. Thinking about it too hard
makes you brain implode. The only satisfaction we gained during this project was making something
work when we were getting errors for hours at a time. (from Angie only: I am so glad I did not go into
computer science because this was extremely difficult and was very unpleasant.)

You might also like