Boxball project - phase #2 completes the project.

The extra features included here are NOT required.



  1. Notice how the ball drops from the center of where the mouse was clicked. Actually, my implementation used onMouseRelease() instead of onMouseClick(), because Java is so horrible about recognizing mouse clicks. You can feel free to use onMouseRelease(), if you wish.

  2. Try out the change of difficulty level buttons. Switch from EASY to MEDIUM to HARD. Watch two things happen:
        i. The "line" moves to the height appropriate for that level
           of player and game.
    
       ii. The box becomes wider or narrower than it was before.
    

  3. Click above the line. When you click above the line, the move() method for the Box class is tested out. You should see the box relocate itself to a new randomly chosen position.

  4. Go ahead and use a Line object, if you wish. Your drop line just has to look like a horizontal line and function correctly when the player clicks above it or below it. However, I implemented my drop line as a FilledRect with a height of 1, which looks exactly like a Line object. Unlike the Line object, the FilledRect object responds to the getY() accessor method message by telling the client its vertical or Y position. The Line does not allow for .getY().
    Methods Available for All 2-D Graphic Objects 
                                                (including Text, but not Line)
                                                                         ----
    someObject.getX();             Access coordinates of the upper left
    someObject.getY();                corner of an object's bounding rectangle.  
    someObject.getLocation();   
    
    someObject.getWidth();         Access the dimensions of an object's 
    someObject.getHeight();           bounding rectangle.  
    
    
  5. What methods are developed and tested for the Box class?