|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrcssjava.comm.CoachCommandHandler
rcssjava.comm.TrainerCommandHandler
public class TrainerCommandHandler
Handles contruction of outgoing commands to the server for offline trainers. This class contains all of the commands that a trainer can send but a coach cannot. A trainer always uses the left team's coordinate system.
CoachCommandHandler
Field Summary |
---|
Fields inherited from class rcssjava.comm.CoachCommandHandler |
---|
C, WS |
Constructor Summary | |
---|---|
TrainerCommandHandler(Connection c)
Constructs a command handler with a null world state |
|
TrainerCommandHandler(Connection c,
WorldState ws)
Constructs a command handler with the given world state |
Method Summary | |
---|---|
void |
changeMode(int playMode)
Change the current play mode |
void |
changePlayerType(int id,
int playerType)
Change the heterogenous player type of a given player. |
void |
checkBall()
Request message from server to determine what part of the field the ball is in. |
void |
ear(boolean mode)
Turn "hear" messages on or off |
void |
init(double version)
Send init message to server without specifying a team. |
void |
move(int id,
VecPosition pos)
Move object to a given position with zero velocity |
void |
move(int id,
VecPosition pos,
double vDir)
Move object to a given position and set the direction in which it's facing. |
void |
move(int id,
VecPosition pos,
double vDir,
VecPosition vel)
Move object to a given position, set its velocity and set the direction in which it's facing. |
void |
move(int id,
VecPosition pos,
VecPosition vel)
Move object to a given position and set its velocity |
void |
recover()
Restore players' stamina |
void |
start()
Send start message to server |
Methods inherited from class rcssjava.comm.CoachCommandHandler |
---|
done, eye, init, say, setWorldState, teamNames |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TrainerCommandHandler(Connection c)
c
- connectionCoachCommandHandler.setWorldState(WorldState)
public TrainerCommandHandler(Connection c, WorldState ws)
c
- connectionws
- world state to connect to this parserMethod Detail |
---|
public void changeMode(int playMode)
playMode
- play mode to change topublic void move(int id, VecPosition pos)
id
- object IDpos
- new positionpublic void move(int id, VecPosition pos, VecPosition vel)
id
- object IDpos
- new positionvel
- new velocitypublic void move(int id, VecPosition pos, double vDir)
id
- object IDpos
- new positionvDir
- new angle in degreespublic void move(int id, VecPosition pos, double vDir, VecPosition vel)
id
- object IDpos
- new positionvDir
- new angle in degreesvel
- new velocitypublic void checkBall()
public void start()
public void recover()
public void ear(boolean mode)
mode
- set to true
to turn "hear" messages onpublic void init(double version)
version
- protocol version number supportedpublic void changePlayerType(int id, int playerType)
changePlayerType
in class CoachCommandHandler
id
- player ID of player to changeplayerType
- new heterogenous type for player
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |