Hangman+Code


 * Variables**

A special variable in Scratch called a List is used to store all of the different words for the game.

Under //**Data**//, chose //**Make a List**// and then add the words for the game to your list like the following.



Once the list of words is complete, uncheck the box beside the list to hide it.

Other variables:


 * chosen_word - the word the player has to guess
 * computer_score - the number of games the computer has won
 * correct_letter - for each guess this is set to false at the beginning, and if the player has guessed a correct letter in the word it is then set to true
 * guessed_letter - the letter that the player has guessed
 * guessed_word - the current state of the word the player has guessed, with dashes stored for all letters not currently guessed
 * incorrect_guesses - used to count the number of wrong guesses so we can tell when the player has run out of guesses
 * letter_counter - used to go through each letter of the word one at a time to see if the player has guessed a correct letter or not
 * new_guessed_word - see guessed word above
 * player_score - the number of games the player has won
 * random_word_number - picks a random word each game from those available in the list


 * Backdrop Script**




 * Zombie Sprite Script**