|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lab6lib.Karel
public class Karel
A class that creates Karel the robot and allows the user to move Karel.
Constructor Summary | |
---|---|
Karel()
Creates a new instance of Karel. |
Method Summary | |
---|---|
void |
addToDrawingCanvas(DrawingCanvas canvas,
java.awt.Point startingPoint)
In order to see Karel, you must add him to a graphics.DrawingCanvas at a particular point. |
void |
faceEast()
Tells Karel to face East. |
void |
faceNorth()
Tells Karel to face North. |
void |
faceSouth()
Tells Karel to face South. |
void |
faceWest()
Tells Karel to face West. |
void |
move(java.lang.Integer numberOfSteps)
Tell Karel to move in his current direction a specified number of steps. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Karel()
Method Detail |
---|
public void addToDrawingCanvas(DrawingCanvas canvas, java.awt.Point startingPoint)
canvas
- The DrawingCanvas to put Karel upon.startingPoint
- The point where Karel should first be located.public void faceNorth()
public void faceSouth()
public void faceEast()
public void faceWest()
public void move(java.lang.Integer numberOfSteps)
numberOfSteps
- The number of steps Karel should move.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |