CS 104 Lab # 3

Objective:   To gain experience with objects, loops and animations
Hypothesis:   Give the design of the program
Solution:   A complete program with proper format and comments. A statement explaining how your hypothesis was tested and what corrections are made to the design

Space Travel

In this game, we will make the "space travel" game. The applet below will demonstrate what we have in mind. You should experiment with the demonstration to make sure you understand exactly what's required. Here's a description:
  1. In a background of stary night, there are three planets, referred to as: a blue "ice" planet, a gray "iron" planet, and a red "fire" planet.
  2. The player can only drag the "ice" planet. The "ice" planet cannot touch the "fire" ball, or else the "ice" planet melts and the game is over.
  3. The goal is to push the "ice" planet against the "iron" planet, which in turn pushes the "fire" planet toward the destination. If the "fire" planet reaches the destination, the game is won.
  4.  Along the way, the planets need to stay away from two bouncing "black holes", which are made of about 40 concentric circles. They will suck in any plant getting too close to them. If this happens, the game is over.

The click-to-restart feature is not required.





Grading Points

Grading Point Allocations

Value

Feature
Style, and Efficiency (4 pts total)
2 pts. appropriate comments
1 pts. good variable names
1 pts. appropriate formatting
 
Correctness of the program (10 pts)
10 pts the game behaves properly and naturally
 
Formulate and test the hypothesis (6 pts)
3 pts quality of the design
3 pts testing of the hypothesis
 
2 bonus pt. extra features