public class Track extends Object
Constructor and Description |
---|
Track(double x1,
double y1,
double x2,
double y2,
Color color,
Stroke stroke,
Turtle.UnderTheShell key)
Construct a new track segment
|
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics2D context,
Terrarium.UnderTheSurface key)
Draw the track in the terrarium
|
public Track(double x1, double y1, double x2, double y2, Color color, Stroke stroke, Turtle.UnderTheShell key)
Construct a new track segment
May only be called by Turtle
and its subclasses, enforced via Turtle.UnderTheShell
.
x1
- coordinate of starty1
- coordinate of startx2
- coordinate of endy2
- coordinate of endcolor
- of trackstroke
- style of trackkey
- to authenticate "Turtleness"public void draw(Graphics2D context, Terrarium.UnderTheSurface key)
Draw the track in the terrarium
May only be called by Terrarium
and its subclasses, enforced via Terrarium.UnderTheSurface
.
context
- for drawing commandskey
- to authenticate "Terrarium-iality"Copyright © 2018. All rights reserved.