|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttortues.Tortoise
public class Tortoise
Franklin is a Tortoise * @author Julien VAUBOURG * @version 0.2 (2010-10-12)
Constructor Summary | |
---|---|
protected |
Tortoise()
Constructor |
Method Summary | |
---|---|
protected int |
backward(int steps,
java.awt.Dimension vivariumSize)
Backward the turtle according to its orientation |
protected void |
backwardTorique(java.awt.Dimension vivariumSize)
If the turtle is on a border and that it must backward, this function can to cross it across the torique plan |
protected int |
forward(int steps,
java.awt.Dimension vivariumSize)
Forward the turtle according to its orientation |
protected void |
forwardTorique(java.awt.Dimension vivariumSize)
If the turtle is on a border and that it must forward, this function can to cross it across the torique plan |
protected java.awt.Point |
getCoord()
Returns the current turtle position |
protected int |
getOrientation()
Returns the current turtle orientation |
protected void |
go2(java.awt.Point p)
Put the turtle to a specified position |
protected boolean |
isInDrawMode()
Is pen down ? |
protected void |
origin()
Put on the original position |
protected void |
penDown()
Switch draw mode to On |
protected void |
penUp()
Switch draw mode to Off |
protected void |
turnLeft(int deg)
Change the orientation of the turtle of -x degrees |
protected void |
turnRight(int deg)
Change the orientation of the turtle of x degrees |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Tortoise()
Method Detail |
---|
protected void origin()
protected java.awt.Point getCoord()
protected int getOrientation()
protected boolean isInDrawMode()
protected void turnLeft(int deg)
deg
- Degrees to rotateprotected void turnRight(int deg)
deg
- Degrees to rotateprotected void penDown()
protected void penUp()
protected int forward(int steps, java.awt.Dimension vivariumSize)
steps
- Number of pixel to movevivariumSize
- Vivarium's size
protected int backward(int steps, java.awt.Dimension vivariumSize)
steps
- Number of pixel to movevivariumSize
- Vivarium's size
protected void go2(java.awt.Point p)
p
- Go to pprotected void forwardTorique(java.awt.Dimension vivariumSize)
vivariumSize
- Vivarium's sizeprotected void backwardTorique(java.awt.Dimension vivariumSize)
vivariumSize
- Vivarium's size
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |