|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Parser
Field Summary | |
Communication |
communication
a new Communication instance |
Constructor Summary | |
Parser(Communication communication)
creates a new Parser instance |
Method Summary | |
void |
catchBall(double direction)
Catches the ball in the given direction |
void |
dash(double power)
gives a runnig impulse with a given power |
Event |
event()
receives the incoming message from server and indicates which type of the event it is |
void |
init(java.lang.String teamName,
int playerNumber)
sends an init-command to the server |
void |
kick(double power,
double direction)
Kicks into a given directions with a given power |
void |
move(double x,
double y)
Places the player to a give position on the field |
void |
say(double message)
Says a message, which other players on the field can hear |
char |
side()
The current side of the team's own goal |
void |
turn(double moment)
Turns the body of the player on the field |
void |
turnNeck(double moment)
Turns the head of the player on the field |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Communication communication
Communication
instanceConstructor Detail |
public Parser(Communication communication)
Parser
instanceCommunication
- a Communication
instanceMethod Detail |
public void init(java.lang.String teamName, int playerNumber)
teamName
- the current name of the teamplayerNumber
- a number of the current playerpublic Event event()
Event
object containing server informationpublic void dash(double power)
power
- a double
value which contains the power of the impulsepublic void kick(double power, double direction)
power
- a double
value spesifying the power of the kickdirection
- a double
value giving the direction of the kickpublic void move(double x, double y)
x
- a double
value which gives the position in x directiony
- a double
value which gives the position in y directionpublic void turn(double moment)
moment
- a double
value which gives the angle (in degree) relative
to the player's body in which he wants to turnpublic void turnNeck(double moment)
moment
- a double
value which gives the angle (in degree) relative
to the player's body in which he wants to turnpublic void catchBall(double direction)
direction
- adouble
value which gives the angle (in degree) relative
to the goalie's body in which he wants to catch the ballpublic void say(double message)
message
- a String
value which gives the player' s message that he wants to saypublic char side()
side
value which contains the current side of the teams's own goal
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |