Worksheets‎ > ‎

Post MoleMash Worksheet

1. MoleMash has an event that doesn't really fit into the category of user-initiated event or external event. What is it?
In Mole Mash App there are some events that are not handled by the user but work behind the scenes. One of these is the clock timer that moves the mole around the screen as well as the screen initialize.  


2. The animation in MoleMash occurs in a Canvas component.

a. What function blocks can you use to move an image sprite within the canvas? What are the function's parameters?

To create a parameter that will help move the mole within the canvas you use the block move.mole. and input a number from 0 to cw-mw. 

b. How do you refer to the vertical and horizontal location of an image sprite within the canvas?

To move the image sprite within the canvas you need to control the variable for x and  y  in the block editor. There you you must make 

c. What is the unit of measurement for location on the canvas?

the unit of measurement for locations in the canvas where the sprite or the ball can move is called pixels. Pixels are the canvas being split into a grid like that contains an x and a y.

d. How can your app find out the width or length of the device's screen?

Your app can find the width or length of the screen in the designer, you can divide in half the measurements of the image to center objects. In the designer on the side in the properties it can be found.

e. How is color defined in App Inventor? How is it defined in HTML?

There are about 12 colors already in the App inventor that can be used to change the color of the balls,text or canvas background. You can also use colors to create lines or dots on the canvas like how it was done in the Post Purr App where the user could draw bog or small dots. The blocks used in the block editor are 1-with color blocks and another 2 for only numbers.

3. The MoleMash tutorial has you define a procedure.

a. Name it.

In the Mole Mash tutorial the procedure that is defined is the Move Mole block. 

b. Could you write the MoleMash app without defining the procedures?

The Mole Mash app can be written without defining the procedures.

c. Why do you think the procedure was defined?

When a procedure is defined it makes easier to control many things at one time therefore there are less blocks to make and control. 

4. Sketch the blocks to increment (add a point to) the score in MoleMash. How would you subtract?

You would add "set hit count" with "text hitcount +1"

5. When a row of blocks is performed, in what order are they performed?

When a row of blocks is performed there are made to be in descending order. 

6. a. How could you modify MoleMash to make the mole move faster?

You can modify Mole Mash to make the mole move faster by the block that controls the set clock timer. In the set clock.timer interval you reduce the number to a smaller quanitity to make it move faster.

b. How could you modify MoleMash so that the user can change the speed of the mole?
Comments