Class BallTurtle

java.lang.Object
  extended by SpritePixels
      extended by BallTurtle

public class BallTurtle
extends SpritePixels

This class provides the turtle's appearance, the array of pixels that make up its image. In this case, the image is a circle.


Field Summary
 
Fields inherited from class SpritePixels
BLACK_OPAQUE_PIXEL, CLASS_NAME, MAX_SPRITE_HEIGHT, MAX_SPRITE_WIDTH, MIN_SPRITE_HEIGHT, MIN_SPRITE_WIDTH, ROTATE_LEFT_RIGHT, ROTATE_OFF, ROTATE_ON, ROTATE_RIGHT_LEFT
 
Constructor Summary
BallTurtle(java.awt.Color color, double heading)
           
BallTurtle(int diameter, java.awt.Color color, double heading)
           
 
Method Summary
protected  void initSpritePixels(int turtleSideSize)
          Initialize the pixels composing the Sprite's image, a ball.
 boolean setSpriteHeading(double newHeading)
          Rotate the turtle to a specified heading (radians).
 
Methods inherited from class SpritePixels
getHeight, getMinimumHeight, getMinimumWidth, getPixels, getSideSize, getWidth, setCirclePixels, setLinePixels, setPixel, setSpriteColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BallTurtle

public BallTurtle(java.awt.Color color,
                  double heading)

BallTurtle

public BallTurtle(int diameter,
                  java.awt.Color color,
                  double heading)
Method Detail

initSpritePixels

protected void initSpritePixels(int turtleSideSize)
Initialize the pixels composing the Sprite's image, a ball.

Overrides:
initSpritePixels in class SpritePixels

setSpriteHeading

public boolean setSpriteHeading(double newHeading)
Rotate the turtle to a specified heading (radians). Return true if the Sprite's image changed, false if not. Override SpritePixels.setSpriteHeading() and do nothing. Rotating a ball does not change its image...

Overrides:
setSpriteHeading in class SpritePixels