Categories: Excelling Homework

CSCI 2447 Columbus State Community College HTML Programming Project 6 Game Copy ALL of the contents in the public_html/csci2447/project5 folder into the pu

CSCI 2447 Columbus State Community College HTML Programming Project 6 Game Copy ALL of the contents in the public_html/csci2447/project5 folder into the public_html/csci2447/project6 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) In the last project, you created an addMole() function which added the mole image to #gamespace. This worked well but each time it is called, it replaced the image which was already in there with a new one. We want to preserve the moles already in the #gamespace. Change your use of .html() in addMole() to .append(). Done!
(5 pts) Add a check (using an if-statement) to your function which decrements the timer that checks to see if the seconds remaining > 0 before repeating the call. You do not want your seconds to count past zero!
(5 pts) Now we will try to make the moles appear randomly around the screen. First, add the following code to your game.css file. This will allow us to use the “top” and “left” CSS styles on the mole IMG tag.

div#gamespace img { position: absolute; }

Don't use plagiarized sources. Get Your Custom Essay on
CSCI 2447 Columbus State Community College HTML Programming Project 6 Game Copy ALL of the contents in the public_html/csci2447/project5 folder into the pu
For $10/Page 0nly
Order Essay

And add the following property to div#gamespace:

div#gamespace { position: relative; }
(15 pts) To actually randomly move each mole, you will need to call your random number functions! Call each function once in the addMole() function and save the returned value to a variable (eg. xPos and yPos). Now that you have two random values, you will need to add a “style” attribute to the mole IMG tag. For example:

In this “style” attribute, you will need to add a “left” and “top” property. The values for each property will be your random numbers.

Tweak the values of your random function to make the moles stay within the #gamespace.

Hint: The actual value would be be stored within a variable. You will call the function to run, and have the value stored within a variable. You will place the variable within the line of code where the value is to added.
(5 pts) When the mole is clicked, it should disappear as if it was whacked! To do this, add a line of code to your.on() function that makes image disappear when clicked. Note: There are a variety of methods that will allow you to do so in jQuery, and jQuery UI.

(15 pts) Randomize the time interval in which new moles appear. Currently, it is set to a static 2000 (2 seconds). The interval should vary between 0 and 2000 at random. You may create a new random function similar to your random x and y functions, if you like. Moles should now appear at random intervals!

This is my current project. The format needs to stay the same with olaf but the stuff above needs added to this.

http://citwebdev.cscc.edu/~jwilliams385/csci2447/project5/project5/

admin

Recent Posts

Economic Debate #3- Progressive Income Tax – The Homework Helper

Economic Debate- Progressive Income Tax For this Economic Debate, we are going to discuss the…

2 years ago

MKT 6120 – Marketing Management – Davis Learning Engagement #7

TOPIC: Going Global Discussion Thread 1 (initial post due Wednesday for full credit) Please note:…

4 years ago

jvjvjhvjhvhjvj

Assignment Topic This week will culminate in the creation of a narrated PowerPoint to create…

4 years ago

Students are supposed to select a technological organization of their choice.

The Assignment must be submitted on Blackboard (WORD format only) via allocated folder. Assignments submitted…

4 years ago

Increases the risk of wildfires

you need to post your 2-page information flier to share with your Final Project Group.…

4 years ago

Statistics for Technology management

discussion: Discuss the methods used at your company to measure and ensure quality products and…

4 years ago