I attached my assignment from project 2 and renamed it project 3
- (5 pts) Copy ALL of the contents in the public_html/csci2447/project2 folder into the public_html/csci2447/project3 folder. This ensures that you will not overwrite your work for the previous project. You will do this for each project from here on out. If you do not do this, there is no way for me to grade your previous project.
- (5 pts) Remove the code previously added in Project 3 which shows the alert(). Only remove this line. Leave the ready() function. Type all of you code (except functions) in this ready function.
- (5 pts) In the index.html file, find the line in div#gamespace that adds an image of the mole. Delete the entire img tag from div#gamespace.
- (5 pts) Add a line of jQuery code that shows the #timer. It will just appear now on load. This is because it is initially hidden upon start. In the next project, you will make its appearance dynamic!
- (10 pts) Write two functions that generate random whole numbers. One function should return numbers between 0 and 300 (for the y positioning) and the other should return numbers between 0 and 600 (x positioning). Name them appropriately. Do not write these functions in the jQuery ready function. Write them just below it. You should test them to ensure they are working properly. Call them from the jQuery ready function and alert() the values. Do not comment out the alerts or remove them.
- (5 pts) Create a function (outside the jQuery ready function) which increments the user’s score when called and updates the HTML in span#score. Hint: You should create a global variable to keep track of the score.
- (5 pts) Call your score increment function within Document Ready for testing purposes.