Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Javascript (DOM) Game Creation: Instruction as below: Assignment 03: Find the Coin! For this assignment you will be creating a simple game of chance that

Javascript (DOM) Game Creation: Instruction as below:

Assignment 03: Find the Coin!

For this assignment you will be creating a simple game of chance that the user can play in their browser. The rules for the game are as follows:

  • The user starts with a bank value of $50
  • The user is presented with three red solo cups. Behind one of the cups is hidden a small coin. The coin should be randomly placed behind one of the cups when the page loads.
  • The user is asked to select one of three cups by clicking their mouse on the desired cup
  • If they find the coin they earn $5. If they do not find the coin they lose $5.
  • The user can then click a "Play Again" button to try another round. The coin is then re-randomized and placed behind another (or the same) cup for the next round.
  • The user can continue to play as long as they have money in their bank. If the user runs out of money your program should not allow them to select another cup. Display some kind of "game over" message when this happens. Hint: test your program with a lower initial bank amount to make sure this feature works correctly!

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

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions