public interface ActionsPlayer
Modifier and Type | Method and Description |
---|---|
void |
bye()
This is used to disconnect a player from the server.
|
void |
catchBall(double direction)
Goalie special command.
|
void |
changeViewMode(ViewQuality quality,
ViewAngle angle)
Changes the view parameters of the player.
|
void |
dash(int power)
This command accelerates the player in the direction of its body.
|
int |
getNumber()
Gets the players number.
|
String |
getTeamName()
Requests the name of the team the player features in.
|
void |
handleError(String error)
The method used to show errors.
|
boolean |
isTeamEast()
Checks if the team is east or west.
|
void |
kick(int power,
double direction)
This command accelerates the ball with the given power in the given direction.
|
void |
move(int x,
int y)
This command can only be executed before kick off or after a goal.
|
void |
say(String message)
This command broadcasts the message throughout the field.
|
void |
setNumber(int num)
Sets the players number.
|
void |
setTeamEast(boolean is)
Sets the team as east or west.
|
void |
turn(double angle)
This command will turn the players body in degrees relative to their
current direction.
|
void |
turnNeck(double angle)
This command can be sent (and will be executed) each cycle independently,
along with other action commands.
|
void dash(int power)
power
- Power is between minpower (-100) and maxpower (+100).void move(int x, int y)
x
- X location (between -54 and +54).y
- Y location (between -32 and +32).void kick(int power, double direction)
power
- Power is between minpower (-100) and maxpower (+100).direction
- Direction is relative to the body of the player.void say(String message)
message
- A valid String to say.void turn(double angle)
angle
- Angle to turn (between -180 and +180).void turnNeck(double angle)
angle
- Angle to turn the neck (between minneckang and maxneckang) (-90 to +90)void catchBall(double direction)
direction
- The direction in which to catch, relative to its body.void changeViewMode(ViewQuality quality, ViewAngle angle)
angle
- Between NARROW, NORMAL or WIDE.quality
- Between HIGH or LOW.void bye()
void handleError(String error)
error
- The error to show.String getTeamName()
boolean isTeamEast()
void setTeamEast(boolean is)
is
- true if east.void setNumber(int num)
num
- The players number (from 1 to 11).int getNumber()
Copyright © 2003–2015 Atan. All rights reserved.