|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--de.uni_paderborn.robots.robotArenaInterface.AbstractRobotAction
|
+--de.uni_paderborn.robots.robotArenaInterface.RotateAction
This class describes a RotateAction.
RotateAction is a possible return value
of the "getCommand" method.
This Action should be returned
by "getCommand" if a robot wants to
rotate.
The energy of the robot will decrease.
| Field Summary | |
private byte |
direction
"direction"'s value is between 0 and 5 1 = rotate 60° clockwise 2 = rotate 120° clockwise 3 = rotate 180° clockwise 4 = rotate 240° clockwise 5 = rotate 300° clockwise |
| Constructor Summary | |
RotateAction(int direction)
the parameter "direction" of RotateAction allows the complete range of "int" ( WARNING : 0 and multiples of 6 cause the arena to decrease the energy of the robot without changing the direction ) sane examples : -8 = rotate 120° counter clockwise ( to the left ) -5 = rotate 300° counter clockwise ( to the left ) -3 = rotate 180° counter clockwise ( to the left ) -2 = rotate 120° counter clockwise ( to the left ) -1 = rotate 60° counter clockwise ( to the left ) 1 = rotate 60° clockwise ( to the right ) 3 = rotate 180° clockwise ( to the right ) 4 = rotate 240° clockwise ( to the right ) 7 = rotate 60° clockwise ( to the right ) |
|
| Method Summary | |
byte |
getDirection()
returns a number between 0 and 5 0 = robot wants to drain energy 1 = robot wants to rotate 60° clockwise ( 1xright ) 2 = robot wants to rotate 120° clockwise ( 2xright ) 3 = robot wants to rotate 180° clockwise ( u-turn ) 4 = robot wants to rotate 240° clockwise ( 2xleft ) 5 = robot wants to rotate 300° clockwise ( 1xleft ) |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private byte direction
| Constructor Detail |
public RotateAction(int direction)
direction - Direction in which the robot wants to be rotated to| Method Detail |
public byte getDirection()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||