| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.aplu.nxt.NxtRobot
ch.aplu.nxt.TurtleRobot
public class TurtleRobot
Implementation of the basic Logo turtle movements.
| Field Summary | 
|---|
| Constructor Summary | |
|---|---|
| TurtleRobot()Creates a TurtleRobot instance. | |
| TurtleRobot(boolean waitStart)Creates TurtleRobot instance and delays execution until the user presses the ENTER button. | |
| Method Summary | |
|---|---|
|  TurtleRobot | backward(int steps)Moves the turtle backward the given number of steps. | 
|  TurtleRobot | forward(int steps)Moves the turtle forward the given number of steps. | 
|  Gear | getGear()Returns the gear used as component of the turtle. | 
|  int | getTurtleSpeed()Returns the current turtle speed. | 
|  TurtleRobot | left(int angle)Turns the turtle to the left for the given angle. | 
|  TurtleRobot | right(int angle)Turns the turtle to the right for the given angle. | 
|  TurtleRobot | setTurtleSpeed(int speed)Sets the turtle speed to the given value. | 
| Methods inherited from class ch.aplu.nxt.NxtRobot | 
|---|
| addPart, exit, getBatteryLevel, getVersion, playTone | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public TurtleRobot(boolean waitStart)
waitStart - if true, the execution is stopped until the ENTER button is hit.public TurtleRobot()
| Method Detail | 
|---|
public Gear getGear()
public TurtleRobot setTurtleSpeed(int speed)
speed - 0..100
public int getTurtleSpeed()
public TurtleRobot forward(int steps)
steps - the number of steps to go.
public TurtleRobot backward(int steps)
steps - the number of steps to go.
public TurtleRobot left(int angle)
angle - the angle in degree to rotate.
public TurtleRobot right(int angle)
angle - the angle in degree to rotate.
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||