-- Introduction to Computer Science II
Exercises: [no exercises this week.]
1. Extend the Asteroids game
program from the text.
(1) Change the world so that asteroids
rockets can wrap around from top to bottom and side to side.
Alter your Station class so that it can move up and down and left and
right. You do not need to get fancy with drawing the Station --
the existing line is sufficient. However, your new station should
also wrap just like the asteroids and rockets will after step 1.
really cool, you can get style points for the "classic look". The
station only moves by thrusters that fire in the opposite direction
from the gun. In order to change directions, you must aim and
apply thrusters. Of course, you continue moving in your current
direction until that gets altered by your thruster.
(3) When asteroids are reduced to zero size, remove them from the
list of asteroids.
(4) After a rocket has hit an asteroid or has
moved for 25 time steps, remove it from the list of rockets.
On your machine where you are doing your homework, create a folder
called <your email name> followed by "A6". For example,
with email address "cjones" would create
a folder called
Inside that folder, place whatever Java files are necessary
your Programming Projects in the same folder. Finally, either tar
zip the folder so that when
extracted, the folder
"<emailname>A6" will be created. Finally, submit via Eureka.