Two Shots | Explanations |
There is 1 pointer and 10 aliens. The pointer is at the bottom. The pointer is controlled by the keyboard. |
Object declaration, instantiation, and initial placement. Declaration of controlled object. |
When an arrow key is pressed, the pointer moves in the same direction. When the spacebar is pressed, the pointer shoots up. |
Conditional statement for describing how to control the pointer. |
The aliens wander around. | Unconditional statement for describing how the aliens move. |
When an alien meets a border, it reverses direction. | Conditional statement for describing border events. |
When an alien is shot and it is original color, it turns purple. When an alien is shot and it is purple, it explodes. |
Conditional statements for collision. |
Map: |
Click the image to try it |
Three Shots | Explanations |
There is 1 pointer and 10 aliens. The pointer is at the bottom. The pointer is controlled by the keyboard. |
Object declaration, instantiation, and initial placement. Declaration of controlled object. |
When an arrow key is pressed, the pointer moves in the same direction. When the spacebar is pressed, the pointer shoots up. |
Conditional statement for describing how to control the pointer. |
The aliens wander around. | Unconditional statement for describing how the aliens move. |
When an alien meets a border, it reverses direction. | Conditional statement for describing border events. |
When an alien is shot and it is original color, it turns purple. When an alien is shot and it is purple, it turns pink. When an alien is shot and it is pink, it explodes. |
Conditional statements for collision. |
Map: |
Click the image to try it |