|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSimpleTurtle
Turtle
ConfusedTurtle
public class ConfusedTurtle
Class for a confused turtle. A confused turtle is like a turtle but it turns right when asked to turn left and left when asked to turn right.
Constructor Summary | |
---|---|
ConfusedTurtle(ModelDisplay modelDisplayObj)
A constructor that takes a ModelDisplay object |
Method Summary | |
---|---|
void |
turn(int degrees)
Method to turn by the passed degrees (a confused turtle will turn by 360- the passed degrees) |
void |
turnLeft()
Method to turn left (but a confused turtle will actually turn right) |
void |
turnRight()
Method to turn right (but a confused turtle will actually turn left) |
Methods inherited from class Turtle |
---|
drawSquare, drawSquare, drawSquare2 |
Methods inherited from class SimpleTurtle |
---|
backward, backward, clearPath, drawInfoString, drop, forward, forward, getBodyColor, getDistance, getHeading, getHeight, getInfoColor, getModelDisplay, getName, getPen, getPenColor, getPenWidth, getPicture, getShellColor, getShowInfo, getWidth, getXPos, getYPos, hide, isPenDown, isVisible, moveTo, paintComponent, penDown, penUp, setBodyColor, setColor, setHeading, setHeight, setInfoColor, setModelDisplay, setName, setPen, setPenColor, setPenDown, setPenWidth, setPicture, setShellColor, setShowInfo, setVisible, setWidth, show, toString, turnToFace, turnToFace, updateDisplay |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConfusedTurtle(ModelDisplay modelDisplayObj)
modelDisplayObj
- the thing that does the displayMethod Detail |
---|
public void turnRight()
turnRight
in class SimpleTurtle
public void turnLeft()
turnLeft
in class SimpleTurtle
public void turn(int degrees)
turn
in class SimpleTurtle
degrees
- the amount to turn in degrees
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |