Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. [40 pts] 111/p5/DiceGame.html and DiceGame.js Download DiceGame.zip: https://drive.google.com/open?id=0BwECDRBexWG0YXlEcW9pdVRxOEU For this problem, you will create a web page that simulates rolling five dice. You will

4. [40 pts] 111/p5/DiceGame.html and DiceGame.js Download DiceGame.zip: https://drive.google.com/open?id=0BwECDRBexWG0YXlEcW9pdVRxOEU

For this problem, you will create a web page that simulates rolling five dice. You will use the code you wrote in Dice.js

to complete this task. Follow the instructions in the downloaded code files. Your finished solution should look and work as follows:

image text in transcribed

If no user input is given, Rollem! rolls five dice and prints the sum at the bottom of the page..

3

image text in transcribed

If user input is given, Rollem! rolls dice until the input sum, between 5 and 30, is rolled and prints the number of times it took to roll it. In both cases, the most recent roll of the five dice is displayed on the page.

jQuery.attr() function is used to display the images when the page loads and when the dice image needs to be changed.

When the user enters a target number and clicks Roll 'em!, the images are updated die-namically and the results displayed in a div on the page...

Roll"em! You rolled 15

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_2

Step: 3

blur-text-image_3

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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago