Class MoveBranch
java.lang.Object
DrawableNode
Branch
MoveBranch
- public class MoveBranch
- extends Branch
Field Summary |
(package private) int |
x
Position where to draw at |
(package private) int |
y
Position where to draw at |
Constructor Summary |
MoveBranch(int x,
int y)
Construct a branch with children and
next as null |
x
int x
- Position where to draw at
y
int y
- Position where to draw at
MoveBranch
public MoveBranch(int x,
int y)
- Construct a branch with children and
next as null
getXPos
public int getXPos()
- Accessors
getYPos
public int getYPos()
moveTo
public void moveTo(int x,
int y)
toString
public String toString()
- Method to return a string with informaiton
about this branch
- Overrides:
toString
in class Branch
drawWith
public void drawWith(Turtle pen)
- Description copied from class:
DrawableNode
- Use the given turtle to draw oneself
- Overrides:
drawWith
in class Branch