|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPrintGame.Condition
class representing a Condition
Field Summary | |
protected int |
cell_mark_
|
protected int |
state_
|
protected boolean |
wall_ahead_
|
protected boolean |
wall_left_
|
protected boolean |
wall_right_
|
Constructor Summary | |
Condition(int state,
int cell_mark,
boolean wall_left,
boolean wall_right,
boolean wall_ahead)
constructor generates a new condition with the specified arguments |
Method Summary | |
boolean |
equals(Condition test_condition)
method compares 2 conditions and returns true if they are equal. |
int |
getCellMark()
|
int |
getState()
|
boolean |
isWallAhead()
|
boolean |
isWallLeft()
|
boolean |
isWallRight()
|
void |
setCellMark(int cell_mark)
method sets the cell mark |
void |
setState(int state)
|
void |
setWalls(boolean wall_left,
boolean wall_right,
boolean wall_ahead)
method sets if the cells in field of vision of the robot are ways or walls |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected boolean wall_left_
protected boolean wall_right_
protected boolean wall_ahead_
protected int cell_mark_
protected int state_
Constructor Detail |
public Condition(int state, int cell_mark, boolean wall_left, boolean wall_right, boolean wall_ahead) throws java.lang.IllegalArgumentException
wall_left
- false means that the cell on the left of the robot is a waywall_right
- false means that the cell on the right of the robot is a waywall_ahead
- false means that the cell in front of the robot is a waycell_mark
- 0 if the cell is not markedMethod Detail |
public void setWalls(boolean wall_left, boolean wall_right, boolean wall_ahead)
wall_left
- false means that the cell on the left of the robot is a waywall_right
- false means that the cell on the right of the robot is a waywall_ahead
- false means that the cell in front of the robot is a waypublic 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 boolean isWallLeft()
public boolean isWallRight()
public boolean isWallAhead()
public int getCellMark()
public int getState()
public boolean equals(Condition test_condition)
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |