Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Requirements: For this assignment you are to implement a Vanilla JavaScript implementation of a hangman game. With a Vanilla JavaScript implementation, the language should be

image text in transcribed
image text in transcribed
Requirements: For this assignment you are to implement a Vanilla JavaScript implementation of a hangman game. With a Vanilla JavaScript implementation, the language should be targeted for ES5. That is NodeJS isn't needed for this assignment (please don't use features from ES6 or TypeScript and use a tool like Babel to transcribe down to ES5.) For your implementation consider the following algorithm: 1. Upon load of your website, a word should be randomly chosen from an array of hardcoded strings. 2. For the selected word, show the user dashes for each letter in the word. 3. Allow the user to guess one letter at a time. a. If the user guesses correctly, redraw the word with the correctly-guessed characters replacing the dashes. b. If the user guesses incorrectly, change the image dynamically using the required assets zip file provided with the assignment. 4. If the user is able to solve the puzzle, display a message about the player wining and asking if another game is to be played. The game is lost when all images in the assets zip file are presented to the user. Hangman Problem The game of Hangman is a classic pencil and paper guessing game. It can be played with one person or two people. In the two person case, the game is played with one person thinking of a word and the other person attempting to guess the word over a limited number of times. Consider the following sketch of a game in progress: AN - AN. Source: Wikipedia In the above example, the player attempts to guess the word by suggesting one letter at a time. Each time the player is incorrect, the image of the person being hung is altered (such as arms and limbs being drawn each time, etc.) The game is won when the player successfully guesses the word. The game is lost when the player's graphic is hung (and has no more available guesses.) Requirements: For this assignment you are to implement a Vanilla JavaScript implementation of a hangman game. With a Vanilla JavaScript implementation, the language should be targeted for ES5. That is NodeJS isn't needed for this assignment (please don't use features from ES6 or TypeScript and use a tool like Babel to transcribe down to ES5.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

0262660709, 978-0262660709

More Books

Students also viewed these Databases questions

Question

7. It is advisable to do favors for people whenever possible.

Answered: 1 week ago

Question

9. Power and politics can be destructive forces in organizations.

Answered: 1 week ago