Question: How to use JavaScript to make a Web page interactive. This assignment will involve creating the game Concentration (aka Memory) where the user will match

How to use JavaScript to make a Web page interactive. This assignment will involve creating the game Concentration (aka Memory) where the user will match pictures and earn a score. PS NO Jquery!!! Only JavaScript

Requirements:

1. Create the Game.html HTML page that implements the game using JavaScript.

a. The page must contain a 4 x 5 grid of images. i. The images displayed on the screen must correspond to images stored in a JavaScript array.

ii. Display a common image for all of the images on the screen to hide the real image associated with it.

b. Use JavaScript to implement the game and the interactive behavior of the page.

i. When the game starts, you need to use JavaScript to randomly populate an Array with images (URLs to images stored in an images folder will work) that will be used to secretly associate an image on the page with the actual hidden image.

ii. The page needs to allow the user to select two images at a time, display the secret images associated with the ones that were clicked, and determine the result. When the two images the user selected are a match, then game increases the user's score; otherwise, a non-match should decrease the user's score.

iii. The game ends when all images have been turned over.

c. Display a message when the game ends that contains the user's score and allow them to play the game again.

2. Implement one of the following advanced concepts that requires a little research.

a. Remember the user's score between sessions (the next time they come back to your web page), so that they can beat their highest score. The game should display the user's highest score at all times and alert them when they beat it.

b. Implement a timer, so the user gets more points for finishing the game faster.

c. Dynamically load the images on the page instead of statically writing them in the HTML of the page.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To create the Concentration game with the specified requirements and advanced JavaScript concepts you can follow these detailed steps Step 1 Setup HTML and CSS Create the HTML structure Name your HTML ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!