Jump to navigation Jump to search
- a spaceship that shoots bullets when the user clicks the mouse
- aliens that disappear when they are hit by a bullet
There are two levels to this assignment: basic and intermediate.
Part 1: Basic
- 5 aliens are randomly positioned on the page
- the spaceship is positioned at the bottom-center of the page
- neither the spaceship nor the aliens move
- when the user clicks the mouse anywhere on the page, a bullet is fired from the spaceship to the position of the mouse at the time it was clicked
- if the bullet ends up at a position that is overlapping with an alien, that alien disappears
Part 2: Intermediate
Same as in Part 1 above, with an exception:
- the aliens move about randomly about the page, but never leave the boundaries of the page
Same as in Part 1 above.