Class DiamondTurtle

java.lang.Object
  extended by SpritePixels
      extended by DiamondTurtle

public class DiamondTurtle
extends SpritePixels

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


Field Summary
static int DEFAULT_DIAMOND_HEIGHT
          Default height of a DiamondTurtle's image.
 
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
DiamondTurtle(java.awt.Color color, double heading)
          Return a DiamondTurtle Sprite with specified color and heading.
DiamondTurtle(int width, int height, java.awt.Color color, double heading)
          Return a DiamondTurtle Sprite with the specified dimensions, color and heading.
 
Method Summary
protected  void initSpritePixels(int turtleSideSize)
          Initialize the pixels composing the Sprite's image, a diamond.
 
Methods inherited from class SpritePixels
getHeight, getMinimumHeight, getMinimumWidth, getPixels, getSideSize, getWidth, setCirclePixels, setLinePixels, setPixel, setSpriteColor, setSpriteHeading
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DIAMOND_HEIGHT

public static final int DEFAULT_DIAMOND_HEIGHT
Default height of a DiamondTurtle's image.

See Also:
Constant Field Values
Constructor Detail

DiamondTurtle

public DiamondTurtle(java.awt.Color color,
                     double heading)
Return a DiamondTurtle Sprite with specified color and heading.


DiamondTurtle

public DiamondTurtle(int width,
                     int height,
                     java.awt.Color color,
                     double heading)
Return a DiamondTurtle Sprite with the specified dimensions, color and heading.

Method Detail

initSpritePixels

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

Overrides:
initSpritePixels in class SpritePixels