public interface ControllerPlayer
Modifier and Type | Method and Description |
---|---|
ActionsPlayer |
getPlayer()
Returns the current instance of the ActionsPlayer.
|
String |
getType()
Get the players type, if set.
|
void |
infoCPTOther(int unum)
The controller is informed when the change player type message is received.
|
void |
infoCPTOwn(int unum,
int type)
The controller is informed when the change player type message is received.
|
void |
infoHearError(Errors error)
The player is informed when it hears an error message.
|
void |
infoHearOk(Ok ok)
The player is informed when it hears an ok message.
|
void |
infoHearPlayer(double direction,
String message)
The controller is informed when it hears a message from another player.
|
void |
infoHearPlayMode(PlayMode playMode)
The controller is informed when a play mode message is broadcast.
|
void |
infoHearReferee(RefereeMessage refereeMessage)
The controller is informed when a referee message is broadcast.
|
void |
infoHearSelf(String message)
The controller is informed when it hears a message from itself.
|
void |
infoHearWarning(Warning warning)
The player is informed when it hears a warning.
|
void |
infoPlayerParam(double allowMultDefaultType,
double dashPowerRateDeltaMax,
double dashPowerRateDeltaMin,
double effortMaxDeltaFactor,
double effortMinDeltaFactor,
double extraStaminaDeltaMax,
double extraStaminaDeltaMin,
double inertiaMomentDeltaFactor,
double kickRandDeltaFactor,
double kickableMarginDeltaMax,
double kickableMarginDeltaMin,
double newDashPowerRateDeltaMax,
double newDashPowerRateDeltaMin,
double newStaminaIncMaxDeltaFactor,
double playerDecayDeltaMax,
double playerDecayDeltaMin,
double playerTypes,
double ptMax,
double randomSeed,
double staminaIncMaxDeltaFactor,
double subsMax)
The player is informed when the player param message is received.
|
void |
infoPlayerType(int id,
double playerSpeedMax,
double staminaIncMax,
double playerDecay,
double inertiaMoment,
double dashPowerRate,
double playerSize,
double kickableMargin,
double kickRand,
double extraStamina,
double effortMax,
double effortMin)
The player is informed when the player type message is received.
|
void |
infoSeeBall(double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed that the Ball is in sight.
|
void |
infoSeeFlagCenter(Flag flag,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed when one of the flags on the center line are
in sight.
|
void |
infoSeeFlagCornerOther(Flag flag,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed that one of the other teams corner flags is
in sight.
|
void |
infoSeeFlagCornerOwn(Flag flag,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed that one of our teams corner flags is
in sight.
|
void |
infoSeeFlagGoalOther(Flag flag,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed that one of the other teams goal flags
is in sight.
|
void |
infoSeeFlagGoalOwn(Flag flag,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed that one of our teams goal flags
is in sight.
|
void |
infoSeeFlagLeft(Flag flag,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed when one of the flags along the left touchline
is in sight.
|
void |
infoSeeFlagOther(Flag flag,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed when one of the flags behind the other teams
goal is in sight.
|
void |
infoSeeFlagOwn(Flag flag,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed when one of the flags behind our teams
goal is in sight.
|
void |
infoSeeFlagPenaltyOther(Flag flag,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed that one of the other teams penalty box
flags is in sight.
|
void |
infoSeeFlagPenaltyOwn(Flag flag,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed that one of our teams penalty box
flags is in sight.
|
void |
infoSeeFlagRight(Flag flag,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed when one of the flags along the right touchline
is in sight.
|
void |
infoSeeLine(Line line,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed that one of the pitch lines are in sight.
|
void |
infoSeePlayerOther(int number,
boolean goalie,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed that one of the other teams players is in sight.
|
void |
infoSeePlayerOwn(int number,
boolean goalie,
double distance,
double direction,
double distChange,
double dirChange,
double bodyFacingDirection,
double headFacingDirection)
The controller is informed that one of it's own team is in sight.
|
void |
infoSenseBody(ViewQuality viewQuality,
ViewAngle viewAngle,
double stamina,
double unknown,
double effort,
double speedAmount,
double speedDirection,
double headAngle,
int kickCount,
int dashCount,
int turnCount,
int sayCount,
int turnNeckCount,
int catchCount,
int moveCount,
int changeViewCount)
infoSenseBody.
|
void |
infoServerParam(HashMap<ServerParams,Object> info)
The controller is informed when the server param message is received.
|
void |
postInfo()
This is the method called one all the visual information
has been processed.
|
void |
preInfo()
This is the method called before the controller receives all the new visual
information.
|
void |
setPlayer(ActionsPlayer c)
Sets the player that the controller is controlling.
|
void |
setType(String newType)
Set the players type.
|
void preInfo()
void postInfo()
ActionsPlayer getPlayer()
void setPlayer(ActionsPlayer c)
c
- ActionsPlayer.String getType()
void setType(String newType)
newType
- what the type will now bevoid infoSeeFlagRight(Flag flag, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
flag
- possible values: OWN_50, OWN_40, OWN_30, OWN_20, OWN_10, CENTER,
OTHER_10, OTHER_20, OTHER_30, OTHER_40, OTHER_50distance
- The distance to the flag.direction
- The direction of the flag.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeeFlagLeft(Flag flag, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
flag
- possible values: OWN_50, OWN_40, OWN_30, OWN_20, OWN_10, CENTER
OTHER_10, OTHER_20, OTHER_30, OTHER_40, OTHER_50distance
- The distance to the flag.direction
- The direction of the flag.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeeFlagOwn(Flag flag, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
flag
- possible values: LEFT_10, LEFT_20, LEFT_30, CENTER,
RIGHT_10, RIGHT_20, RIGHT_30distance
- The distance to the flag.direction
- The direction of the flag.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeeFlagOther(Flag flag, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
flag
- possible values: LEFT_10, LEFT_20, LEFT_30, CENTER,
RIGHT_10, RIGHT_20, RIGHT_30distance
- The distance to the flag.direction
- The direction of the flag.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeeFlagCenter(Flag flag, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
flag
- possible values: LEFT, CENTER, RIGHTdistance
- The distance to the flag.direction
- The direction of the flag.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeeFlagCornerOwn(Flag flag, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
flag
- possible values: LEFT, RIGHTdistance
- The distance to the flag.direction
- The direction of the flag.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeeFlagCornerOther(Flag flag, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
flag
- possible values: LEFT, RIGHTdistance
- The distance to the flag.direction
- The direction of the flag.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeeFlagPenaltyOwn(Flag flag, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
flag
- possible values: LEFT, CENTER, RIGHTdistance
- The distance to this flag.direction
- The direction of this flag.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeeFlagPenaltyOther(Flag flag, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
flag
- possible values: LEFT, CENTER, RIGHTdistance
- The distance to this flag.direction
- The direction of this flag.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeeFlagGoalOwn(Flag flag, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
flag
- possible values: LEFT, CENTER, RIGHTdistance
- The distance to this flag.direction
- The direction of the flag.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeeFlagGoalOther(Flag flag, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
flag
- possible values: LEFT, CENTER, RIGHTdistance
- The distance to this flag.direction
- The direction of the flag.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeeLine(Line line, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
line
- a Line
object.distance
- The distance to the line.direction
- The direction of the line.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeePlayerOther(int number, boolean goalie, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
number
- The ID of the player (from 1 to 11)goalie
- If the seen player is a goalie. False if unknown.distance
- The distance to the player.direction
- The direction of the player.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeePlayerOwn(int number, boolean goalie, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
number
- The ID of the player (from 1 to 11)goalie
- If the seen player is a goalie. False if unknown.distance
- The distance to the player.direction
- The direction of the player.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoSeeBall(double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection)
distance
- The distance to the ball.direction
- The direction of the ball.distChange
- a double.dirChange
- a double.bodyFacingDirection
- a double.headFacingDirection
- a double.void infoHearReferee(RefereeMessage refereeMessage)
refereeMessage
- possible values: FOUL_OWN, FOUL_OTHER,
HALF_TIME, TIME_UP, TIME_UP_WITHOUT_A_TEAM,
TIME_EXTENDED, DROP_BALL, OFFSIDE_OWN, OFFSIDE_OTHERvoid infoHearPlayMode(PlayMode playMode)
playMode
- possible values: BEFORE_KICK_OFF, TIME_OVER, PLAY_ON,
KICK_OFF_OWN, KICK_OFF_OTHER, FREE_KICK_OWN,
FREE_KICK_OTHER, GOAL_KICK_OWN, CORNER_KICK_OTHER,
GOAL_KICK_OWN, GOAL_KICK_OTHER, GOAL_OWN, GOAL_OTHERvoid infoHearPlayer(double direction, String message)
direction
- The direction from which the message originated.message
- The actual message said.void infoHearSelf(String message)
message
- The actual message said.void infoHearError(Errors error)
error
- The error to handlevoid infoHearOk(Ok ok)
ok
- The message to handle.void infoHearWarning(Warning warning)
warning
- The warning to handle.void infoSenseBody(ViewQuality viewQuality, ViewAngle viewAngle, double stamina, double unknown, double effort, double speedAmount, double speedDirection, double headAngle, int kickCount, int dashCount, int turnCount, int sayCount, int turnNeckCount, int catchCount, int moveCount, int changeViewCount)
infoSenseBody.
viewQuality
- possible values: HIGH, LOWviewAngle
- possible values: NARROW, NORMAL, WIDEstamina
- a double.unknown
- a double.effort
- a double.speedAmount
- a double.speedDirection
- a double.headAngle
- a double.dashCount
- a int.kickCount
- a int.turnCount
- a int.sayCount
- a int.turnNeckCount
- a int.catchCount
- a int.moveCount
- a int.changeViewCount
- a int.void infoCPTOwn(int unum, int type)
unum
- The players uniform number.type
- The players type.void infoCPTOther(int unum)
unum
- The players uniform number.void infoPlayerType(int id, double playerSpeedMax, double staminaIncMax, double playerDecay, double inertiaMoment, double dashPowerRate, double playerSize, double kickableMargin, double kickRand, double extraStamina, double effortMax, double effortMin)
id
- a int.playerSpeedMax
- a double.staminaIncMax
- a double.playerDecay
- a double.inertiaMoment
- a double.dashPowerRate
- a double.playerSize
- a double.kickableMargin
- a double.kickRand
- a double.extraStamina
- a double.effortMax
- a double.effortMin
- a double.void infoPlayerParam(double allowMultDefaultType, double dashPowerRateDeltaMax, double dashPowerRateDeltaMin, double effortMaxDeltaFactor, double effortMinDeltaFactor, double extraStaminaDeltaMax, double extraStaminaDeltaMin, double inertiaMomentDeltaFactor, double kickRandDeltaFactor, double kickableMarginDeltaMax, double kickableMarginDeltaMin, double newDashPowerRateDeltaMax, double newDashPowerRateDeltaMin, double newStaminaIncMaxDeltaFactor, double playerDecayDeltaMax, double playerDecayDeltaMin, double playerTypes, double ptMax, double randomSeed, double staminaIncMaxDeltaFactor, double subsMax)
allowMultDefaultType
- a double.dashPowerRateDeltaMax
- a double.dashPowerRateDeltaMin
- a double.effortMaxDeltaFactor
- a double.effortMinDeltaFactor
- a double.extraStaminaDeltaMax
- a double.extraStaminaDeltaMin
- a double.inertiaMomentDeltaFactor
- a double.kickRandDeltaFactor
- a double.kickableMarginDeltaMax
- a double.kickableMarginDeltaMin
- a double.newDashPowerRateDeltaMax
- a double.newDashPowerRateDeltaMin
- a double.newStaminaIncMaxDeltaFactor
- a double.playerDecayDeltaMax
- a double.playerDecayDeltaMin
- a double.playerTypes
- a double.ptMax
- a double.randomSeed
- a double.staminaIncMaxDeltaFactor
- a double.subsMax
- a double.void infoServerParam(HashMap<ServerParams,Object> info)
info
- A hashmap containing all the server param details.Copyright © 2003–2015 Atan. All rights reserved.