|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--betir.RobocupBehavior
This is the main behavior class.
Field Summary | |
protected boolean |
m_bLastWasTurn
|
Constructor Summary | |
RobocupBehavior(RobocupEnvironment env,
DatagramWrapper dg)
|
Method Summary | |
int |
angleToAngle(int nAngle)
|
int |
angleToPoint(int nX,
int nY)
|
abstract boolean |
canFire()
Determines if a behavior can fire or not |
void |
catchBall(int direction)
Sends a catch command to the server |
void |
changeView(java.lang.String strWidth,
java.lang.String strQuality)
|
void |
dash(float fPower)
Sends a dash command to the server |
void |
dashToBall()
Dashes to the ball. |
void |
dashToPoint(int nX,
int nY)
|
protected TwoDVec |
findInterceptBall(int nAngle)
|
abstract boolean |
fire()
Execute the behavior |
int |
getZoneDist()
|
abstract boolean |
inhibits(RobocupBehavior rb)
Determines if this behavior inhibits another behavior |
void |
kick(float fPower,
int nAngle)
Sends a kick message to the soccer server |
void |
move(int nX,
int nY)
Sends a move message to the soccer server |
void |
say(java.lang.String str)
Sends a say command to the server |
void |
turn(int nAngle)
Sends a turn command to the server |
void |
turnHead(int nAngle)
Sends a turn_neck command to the server |
static boolean |
withinRange(int nNum,
int nCenter,
int nRange)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean m_bLastWasTurn
Constructor Detail |
public RobocupBehavior(RobocupEnvironment env, DatagramWrapper dg)
Method Detail |
public abstract boolean canFire()
public abstract boolean inhibits(RobocupBehavior rb)
rb
- the behavior to be checkedpublic abstract boolean fire()
public void move(int nX, int nY)
nX
- the x-corrdinatenY
- the y-corrdinatepublic void dash(float fPower)
fPower
- the power to dashpublic void kick(float fPower, int nAngle)
fPower
- the power to kicknAngle
- the angle to kickpublic void turn(int nAngle)
nAngle
- the angle to turn your bodypublic void turnHead(int nAngle)
nAngle
- the angle to turnpublic void say(java.lang.String str)
str
- the message to saypublic void catchBall(int direction)
direction
- the direction to catch the ballpublic void changeView(java.lang.String strWidth, java.lang.String strQuality)
public int getZoneDist()
public int angleToPoint(int nX, int nY)
nX
- x-coordinatenY
- y-coordinatepublic int angleToAngle(int nAngle)
nAngle
- public static boolean withinRange(int nNum, int nCenter, int nRange)
nNum
- the number to checknCenter
- the center of the checknRange
- the specified rangepublic void dashToPoint(int nX, int nY)
nX
- the x-coordinate to dash tonY
- the y-coordinate to dash tonMaxPower
- the maximium power of the dashpublic void dashToBall()
protected TwoDVec findInterceptBall(int nAngle)
nAngle
-
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |