Transcript file
This game is loosely based on the Whack-AMole arcade game.
Each game starts with 45 seconds of play.
Moles randomly pop out of holes on the
landscape and the player tries to whack them.
Use the mouse to move the hammer and the
space bar to swing the hammer.
If the player scores more than 30 points then
the winning message is broadcast. If not, the
losing message is broadcast.
Paint or import a
stage with holes
for the sprite to
pop out.
Create a hammer
sprite.
Create a mole
sprite for each
hole and place
one over each
hole.
Create a new variable called “score”
Create a new variable called “time”
When the green flag is clicked:
◦ Set score to 0
◦ Set time to 45
Create a loop which decreases time
by one. Add a small delay for the
countdown. Repeat the loop 45
times.
Add sound to indicate that time is up.
• Add script to the hammer sprite so that it moves
with the mouse. Use a loop.
Hint: use
• Add script to the hammer sprite so when the space
key is pressed the hammer swings.
Hint: Instead of changing costumes use
• Add script to the hammer sprite so when the space
key is pressed and the hammer hits a mole then
the score increases.
Hint: This needs to done for every mole sprite.
Hint: If the hammer is ever covered by a mole then add
When the green flag is
clicked set a delay to
show or hide the mole
sprite.
Add a loop to delay
showing the mole
sprite and determine a
how long you want to
show that sprite.
Do this for each mole.
Each one should have a
different show and
hide pattern.
When the green flag is clicked set
a timer for 1 second more than the
value set in the time variable.
Check to see if the score is bigger
than 30.
◦ If so, display the winning message.
◦ If score is smaller than 30 then display
the losing message.
Add a delay to allow for all sounds
to finish and add code to stop
everything.