|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPrintGame.Action
class representing an action
| Field Summary | |
protected int |
cell_mark_
|
static int |
MOVE_AHEAD
|
static int |
MOVE_BACK
|
static int |
MOVE_LEFT
|
static int |
MOVE_RIGHT
|
protected int |
moving_direction_
|
protected int |
state_
|
| Constructor Summary | |
Action(int state,
int cell_mark,
int moving_direction)
Standard constructor |
|
| Method Summary | |
int |
getCellMark()
method returns the value of the cell mark |
int |
getMovingDirection()
method returns a relative direction. |
int |
GetState()
|
void |
setCellMark(int cell_mark)
method sets the value of cell mark |
void |
setMovingDirection(int moving_direction)
method sets a relative direction used to move the robot. |
void |
setState(int state)
----------------------------------------------------------------------------- |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int MOVE_AHEAD
public static final int MOVE_BACK
public static final int MOVE_LEFT
public static final int MOVE_RIGHT
protected int cell_mark_
protected int state_
protected int moving_direction_
| Constructor Detail |
public Action(int state,
int cell_mark,
int moving_direction)
throws java.lang.IllegalArgumentException
moving_direction - relative directioncell_mark - | Method Detail |
public void setCellMark(int cell_mark)
throws java.lang.IllegalArgumentException
cell_mark - 0 if the cell is not marked
1 if the cell is marked for the first time
2 if the cell was marked before
java.lang.IllegalArgumentException
public void setState(int state)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void setMovingDirection(int moving_direction)
throws java.lang.IllegalArgumentException
moving_direction - possible directions are ahead, back, left and rigth.
java.lang.IllegalArgumentExceptionpublic int getMovingDirection()
public int getCellMark()
public int GetState()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||