Answered step by step
Verified Expert Solution
Question
1 Approved Answer
ARM ASSEMBLY CODE PLEASE The Game of Hangman This is a single - player game. Your assignment is to implement in ARM assembler ( remember
ARM ASSEMBLY CODE PLEASE
The Game of Hangman
This is a singleplayer game. Your assignment is to implement in ARM assembler
remember not to autogenerate the assembly code from C the classic hangman game
as we described during lecture. Make up a dictionary text file as we did in class and
have your program randomly choose a word from the file as the keyword for the user
to guess.
The player then guesses a letter that they think may appear in the word. The
computer checks whether the letter appears in the word and either reveals all
instances of it if it exists or takes away one point from the player's lives this is
equivalent to spelling the word HANGMAN one letter at a time for each guess
in which the guessed letter does not appear in the keyword The computer then
displays somehow the progress that the player has made towards guessing the
word. I would recommend that you display the letters that have been correctly
guessed in the correct location and dashes in the location where the letters have not
been guessed. Also display all the letters that have been guessed up to that point as
well as spell out the letters in the word HANGMAN based on how many bad
guesses have been made. If the user made bad guesses, then print out HA if the
user made bad guesses, then print out HANG etc...
The game continues until either all of the letters have been guessed and the player
wins or all of the player's lives are used up the entire word HANGMAN has been
spelled out In either case, the computer should announce this event and the game
should end.
Here is an example dialog. Words in parentheses are provided for clarity and do
not need to show up in your actual output:
computer picks the word "fireball" from the dictionary file
Computer:
Human: r
Computer: r
Letters guessed: r
Number of lives lost:
Human: a
Computer: r a
Letters guessed: r a
Number of lives lost:
Human: L
Computer: r a l l
Letters guessed: r a l
Number of lives lost:
Human: h
Computer: r a l l
Letters guessed: r a l h
Number of lives lost: H
Human: f
Computer: f r a l l
Letters guessed: r a l h f
Number of lives lost: H
Human: e
Computer: f r e a l l
Letters guessed: r a l h f e
Number of lives lost: H
Human: i
Computer: f i r e a l l
Letters guessed: r a l h f e i
Number of lives lost: H
Human: b
Computer: f i r e b a l l h
Letters guessed: r a l h f e i h
Number of lives lost: H
Computer says "Congratulations! You figured out my word in guesses
and had lives left!"
When you turn in your lab, make sure to include the output screenshot
AND the dictionary.txt file that you used so that I can run it as is
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started