Class DiamondTurtle
java.lang.Object
SpritePixels
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.
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 |
DEFAULT_DIAMOND_HEIGHT
public static final int DEFAULT_DIAMOND_HEIGHT
- Default height of a DiamondTurtle's image.
- See Also:
- Constant Field Values
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.
initSpritePixels
protected void initSpritePixels(int turtleSideSize)
- Initialize the pixels composing the Sprite's image, a diamond.
- Overrides:
initSpritePixels
in class SpritePixels