Programming Assignment 5

Implementing DomeWorld,  a Game Like the CannonWorld


Due: Wednesday, October 17th, at 8 AM and 9 AM


Introduction

With homecoming just around the corner, let's do a lab that gets us into a little school spirit and helps us to cheer on your Panther football team.  Let's make a new program that works just like CannonWorld, but with the spirit of Saturday afternoons in the UNI-Dome!

This assignment asks you to reuse ideas we have used in the past and gives you a chance to have as much fun as you like playing with Java graphics.

For your starting point, you should probably use the base CannonWorld game.


Tasks

  1. Create a Football class. A Football is a member of the Ball family.  It moves through the air, subject to gravity, of course. It paints itself as a tan/brownish ball (you might play with your color wheel from lab 08 to find the appropriate color).  You should change the shape from a circle to something more football shaped, maybe even with seams showing!

     

  2. Implement a DomeWorld class that works just like a CannonWorld. In a DomeWorld, the player "shoots" a FootBall.

    Here are some of the other special features of a DomeWorld:

     

    You should use the code of the CannonWorld class as the basis for your work. You might even copy CannonWorld.java to a file named DomeWorld.java and use it as a template. (Be sure to change the class and constructor names if you do!)

On the Graphics Requirements

We are not asking for world-class graphics here; the simplest line art will earn you the credit. But we don't want the FootBall to look as if it leaves from the shooter's knees or as if the field goal was successful if it lands on the turf under goal posts.

On the other hand, if you get the functionality of this program going soon enough, you can probably have a lot of fun experimenting with the pictures that your game produces (or sounds)!  If our kicker looks like Billy Hallgren and the ball carries a UNI logo, all the better. :-)  Code that shows significant effort and creativity may be rewarded with bonus point(s).

If you want to explore with graphics files, consider the following short code example to get you started.

On Duplication

Ordinarily, I  encourage you not to duplicate code across classes. For this assignment, I will explicitly tell you that it is okay to use copy-and-paste to create DomeWorld from CannonWorld.  This may seem inconsistent... but later, we will use your DomeWorld solutions to learn a really neat set of object-oriented programming ideas -- ideas that will help you to build your own application frameworks!


Deliverables

By the due date and time, submit the files:

Because it is possible for you to submit a variety of sound and/or image files with this assignment - and doing so can confuse my submission system - I will ask that you simply zip these files into a single zip file called

Be sure that your submission follows all homework submission requirements.