|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--wworld.WorldObject | +--wworld.GridObject | +--wworld.MovingObject
The class specifying object MovingObject. This object extends GridObject and additionally specifies the orientation of the object. This class is extended by Agent and Wumpus object classes.
Constructor Summary | |
MovingObject(int objType,
int x,
int y,
int o)
Constructor |
Method Summary | |
int |
getOrientation()
Returns the current direction of the object as integer. |
Directions |
getOrientationDirection()
Returns the current direction of the object as Directions. |
int |
getOrigOrientation()
Returns the original direction or facing of the object. |
void |
move()
Performs the move action (going forward action). |
void |
setOrientation(int o)
Sets the direction or facing of the object. |
void |
turnLeft()
Performs the left turn and sets the new location and orientation of the object. |
void |
turnRight()
Performs the right turn and sets the new location and orientation of the object. |
Methods inherited from class wworld.GridObject |
getLocation, getOrigLocation, setLocation, setLocation |
Methods inherited from class wworld.WorldObject |
getType, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MovingObject(int objType, int x, int y, int o)
Method Detail |
public int getOrientation()
public Directions getOrientationDirection()
public void setOrientation(int o)
public int getOrigOrientation()
public void turnRight()
public void turnLeft()
public void move()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |