|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--de.uni_paderborn.robots.robotArenaInterface.RobotData
This container class is the only parameter for getCommand and contains sight of the robot ( in robot, left, front, right ), the cards on the hand of the robot ( hand ) and the current energy of the robot. All this information is proived by an arena and used to plan / calculate the next action of a robot.
| Constructor Summary | |
RobotData()
constructor without data |
|
RobotData(int energy,
FieldData robot,
FieldData left,
FieldData front,
FieldData right,
CardData[] cards)
Does somebody want this constructor !?!? |
|
| Method Summary | |
FieldData |
getFront()
returns a FieldData reference of field in front of the robot |
CardData[] |
getHand()
returns the current hand of the robot The return value can be null or a reference to an array with 1 to 5 elements, containing no array elements equal to null. |
FieldData |
getLeft()
returns a FieldData reference of field to the left of the robot |
FieldData |
getRight()
returns a FieldData reference of field to the right of the robot |
FieldData |
getRobot()
returns a FieldData reference of the field which robot stands on |
void |
setEnergy(int energy)
used to set the Energy of the robot If energy is 0 the robot's "getCommand" is not called and this Object is not needed ! |
void |
setFront(FieldData front)
used to set the FieldData reference of the field in front of the robot FieldData reference is not allowed to be null. |
void |
setHand(CardData[] cards)
used to give the robot his current hand of cards The parameter "cards" can be null or a reference to an array with 1 to 5 elements which contains no array elements equal to null. |
void |
setLeft(FieldData param)
used to sets the FieldData reference of the field to the left of the robot FieldData reference is not allowed to be null. |
void |
setRight(FieldData right)
used to set the FieldData reference of the field to the right of the robot FieldData reference is not allowed to be null. |
void |
setRobot(FieldData robot)
used to set the FieldData reference of the field where the robot stands FieldData reference is not allowed to be null. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RobotData(int energy,
FieldData robot,
FieldData left,
FieldData front,
FieldData right,
CardData[] cards)
public RobotData()
| Method Detail |
public void setRobot(FieldData robot)
public void setLeft(FieldData param)
public void setFront(FieldData front)
public void setRight(FieldData right)
public void setEnergy(int energy)
public void setHand(CardData[] cards)
throws java.lang.IllegalArgumentException
public final CardData[] getHand()
public final FieldData getRobot()
public final FieldData getLeft()
public final FieldData getFront()
public final FieldData getRight()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||