|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSpaceCraft
OwnSpaceCraft
Field Summary | |
(package private) static int |
INCREMENT
|
(package private) static java.util.Random |
rand
|
Fields inherited from class SpaceCraft |
heading, ID, IDport, xPosition, yPosition |
Constructor Summary | |
OwnSpaceCraft(int port)
Creates OwnSpaceCraft with random position and heading. |
Method Summary | |
void |
draw(java.awt.Graphics g)
Draws the SpaceCraft in white as a arrow point oriented in the heading direction. |
void |
leftTurn()
Increments the heading 90 degrees to the left. |
void |
move()
Move OwnsSpaceCraft ahead one increment in the direstion in which it is headed. |
void |
rightTurn()
Increments the heading 90 degrees to the right. |
Methods inherited from class SpaceCraft |
equals, getHeading, getXPosition, getYPosition, setHeading, setX, setY, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
static java.util.Random rand
static final int INCREMENT
Constructor Detail |
public OwnSpaceCraft(int port)
Method Detail |
public void move()
public void rightTurn()
public void leftTurn()
public void draw(java.awt.Graphics g)
draw
in class SpaceCraft
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |