Weekly assignment #1
Using the Canvas examples provided in class and research on the web you will create the following.
Create a banner at the top of the page that is clouds floating across the screen. Make the banner 800 by 400.
Display the following message under the bottom of the banner
“Welcome to my guessing game”
Under the banner you will have a second canvas area 500 by 500
In that canvas area you will create a simple number guessing game based on the following parameters:
· The user will be given 1000 points
· You will them prompt the use for amount of points to bet from 100 to 1000
· Next prompt the user for a number from 1 to 10
Using Java script you will generate a random number from 1 – 10 if the users number matches the generated number the user wins, if not the user loses.
So that this will not be so boring for the user you will create a simple animation that shows a changing number, let it run for 3 seconds.
Then tell the user whether they won or loss, if they win their points go up by amount bet if they lose their points go down by the amount bet.
Next ask if they would like to play again.