Polymorphism Revisited: Asteroids Game Extension

Introduction

Your goal today is to modify the Asteroids sample solution by adding a new game element and demonstrating it to the instructor.

This is an opportunity for you to be creative, but don't be too ambitious. The goal is to complete your modifications before the end of the lab period.

Requirements

Your new element must move around the screen and interact with the other objects in the game (i.e. collide). It should be visually distinguishable from the other game elements. It should work by having an update() and a draw() like the other animated objects, but otherwise you can decide what exactly it will do.

Possible ideas:

The only existing class you should modify is AsteroidsGame.java, and the only change to that class should be code to insert your new element into the game.

Submitting

You should make sure that your code compiles and runs with the game even if the element doesn't work exactly as you had planned. Submit AsteroidsGame.java and your new class through Web-CAT.