Class BoundsParticle

java.lang.Object
  extended by Particle
      extended by BoundsParticle
Direct Known Subclasses:
BouncyParticle, TeleportParticle

public class BoundsParticle
extends Particle

This Particle keeps track of the size of the window around it, but it does not behave differently.

Author:
Tim

Constructor Summary
BoundsParticle(double hue, double startX, double startY, int boundsX, int boundsY)
          Constructor that lets you determine color, start position, and size of window.
 
Method Summary
 int getBoundsX()
          Return the maximum x-coordinate
 int getBoundsY()
          Return the maximum y-coordinate
 
Methods inherited from class Particle
drawSelf, getColor, getTimesMoved, getXPosition, getXVelocity, getYPosition, getYVelocity, setXPosition, setXVelocity, setYPosition, setYVelocity, takeOneStep
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundsParticle

public BoundsParticle(double hue,
                      double startX,
                      double startY,
                      int boundsX,
                      int boundsY)
Constructor that lets you determine color, start position, and size of window.

Parameters:
hue - A number from 0 to 1 that specifies desired hue of the Particle
startX - The starting x coordinate
startY - The starting y coordinate
boundsX - the maximum x-coordinate of the screen
boundsY - the maximum y-coordinate of the screen
Method Detail

getBoundsX

public int getBoundsX()
Return the maximum x-coordinate

Returns:
the maximum x-coordinate

getBoundsY

public int getBoundsY()
Return the maximum y-coordinate

Returns:
the maximum y-coordinate