robocup.lab.intelligent
Class IntelligentStaticController

java.lang.Object
  extended by robocup.lab.intelligent.IntelligentStaticController
All Implemented Interfaces:
atan.model.ControllerPlayer

public class IntelligentStaticController
extends java.lang.Object
implements atan.model.ControllerPlayer

The Class IntelligentStaticController.


Field Summary
private  atan.model.ActionsPlayer player
          The player.
 
Constructor Summary
IntelligentStaticController()
           
 
Method Summary
 atan.model.ActionsPlayer getPlayer()
          Returns the current instance of the ActionsPlayer.
 java.lang.String getType()
          Get the players type, if set.
 void infoHearError(atan.model.enums.Errors error)
          The player is informed when it hears an error message.
 void infoHearOk(atan.model.enums.Ok ok)
          The player is informed when it hears an ok message.
 void infoHearPlayer(double direction, java.lang.String message)
          The controller is informed when it hears a message from another player.
 void infoHearPlayMode(atan.model.enums.PlayMode playMode)
          The controller is informed when a play mode message is broadcast.
 void infoHearReferee(atan.model.enums.RefereeMessage refereeMessage)
          The controller is informed when a referee message is broadcast.
 void infoHearWarning(atan.model.enums.Warning warning)
          The player is informed when it hears a warning.
 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(atan.model.enums.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(atan.model.enums.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(atan.model.enums.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(atan.model.enums.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(atan.model.enums.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(atan.model.enums.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(atan.model.enums.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(atan.model.enums.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(atan.model.enums.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(atan.model.enums.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(atan.model.enums.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(atan.model.enums.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(atan.model.enums.ViewQuality viewQuality, atan.model.enums.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)
           
private  void pause(int ms)
          Pause.
 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(atan.model.ActionsPlayer p)
          Sets the player that the controller is controlling.
 void setType(java.lang.String newType)
          Set the players type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

player

private atan.model.ActionsPlayer player
The player.

Constructor Detail

IntelligentStaticController

public IntelligentStaticController()
Method Detail

getPlayer

public atan.model.ActionsPlayer getPlayer()
Description copied from interface: atan.model.ControllerPlayer
Returns the current instance of the ActionsPlayer.

Specified by:
getPlayer in interface atan.model.ControllerPlayer
Returns:
ActionsPlayer.

getType

public java.lang.String getType()
Description copied from interface: atan.model.ControllerPlayer
Get the players type, if set.

Specified by:
getType in interface atan.model.ControllerPlayer
Returns:
The players type (any string).

infoHearError

public void infoHearError(atan.model.enums.Errors error)
Description copied from interface: atan.model.ControllerPlayer
The player is informed when it hears an error message.

Specified by:
infoHearError in interface atan.model.ControllerPlayer
Parameters:
error - The error to handle

infoHearOk

public void infoHearOk(atan.model.enums.Ok ok)
Description copied from interface: atan.model.ControllerPlayer
The player is informed when it hears an ok message.

Specified by:
infoHearOk in interface atan.model.ControllerPlayer
Parameters:
ok - The message to handle.

infoHearPlayMode

public void infoHearPlayMode(atan.model.enums.PlayMode playMode)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed when a play mode message is broadcast.

Specified by:
infoHearPlayMode in interface atan.model.ControllerPlayer
Parameters:
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_OTHER

infoHearPlayer

public void infoHearPlayer(double direction,
                           java.lang.String message)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed when it hears a message from another player.

Specified by:
infoHearPlayer in interface atan.model.ControllerPlayer
Parameters:
direction - The direction from which the message originated.
message - The actual message said.

infoHearReferee

public void infoHearReferee(atan.model.enums.RefereeMessage refereeMessage)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed when a referee message is broadcast.

Specified by:
infoHearReferee in interface atan.model.ControllerPlayer
Parameters:
refereeMessage - possible values: FOUL_OWN, FOUL_OTHER, HALF_TIME, TIME_UP, TIME_UP_WITHOUT_A_TEAM, TIME_EXTENDED, DROP_BALL, OFFSIDE_OWN, OFFSIDE_OTHER

infoHearWarning

public void infoHearWarning(atan.model.enums.Warning warning)
Description copied from interface: atan.model.ControllerPlayer
The player is informed when it hears a warning.

Specified by:
infoHearWarning in interface atan.model.ControllerPlayer
Parameters:
warning - The warning to handle.

infoSeeBall

public void infoSeeBall(double distance,
                        double direction,
                        double distChange,
                        double dirChange,
                        double bodyFacingDirection,
                        double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed that the Ball is in sight.

Specified by:
infoSeeBall in interface atan.model.ControllerPlayer
Parameters:
distance - The distance to the ball.
direction - The direction of the ball.

infoSeeFlagCenter

public void infoSeeFlagCenter(atan.model.enums.Flag flag,
                              double distance,
                              double direction,
                              double distChange,
                              double dirChange,
                              double bodyFacingDirection,
                              double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed when one of the flags on the center line are in sight.

Specified by:
infoSeeFlagCenter in interface atan.model.ControllerPlayer
Parameters:
flag - possible values: LEFT, CENTER, RIGHT
distance - The distance to the flag.
direction - The direction of the flag.

infoSeeFlagCornerOther

public void infoSeeFlagCornerOther(atan.model.enums.Flag flag,
                                   double distance,
                                   double direction,
                                   double distChange,
                                   double dirChange,
                                   double bodyFacingDirection,
                                   double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed that one of the other teams corner flags is in sight.

Specified by:
infoSeeFlagCornerOther in interface atan.model.ControllerPlayer
Parameters:
flag - possible values: LEFT, RIGHT
distance - The distance to the flag.
direction - The direction of the flag.

infoSeeFlagCornerOwn

public void infoSeeFlagCornerOwn(atan.model.enums.Flag flag,
                                 double distance,
                                 double direction,
                                 double distChange,
                                 double dirChange,
                                 double bodyFacingDirection,
                                 double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed that one of our teams corner flags is in sight.

Specified by:
infoSeeFlagCornerOwn in interface atan.model.ControllerPlayer
Parameters:
flag - possible values: LEFT, RIGHT
distance - The distance to the flag.
direction - The direction of the flag.

infoSeeFlagGoalOther

public void infoSeeFlagGoalOther(atan.model.enums.Flag flag,
                                 double distance,
                                 double direction,
                                 double distChange,
                                 double dirChange,
                                 double bodyFacingDirection,
                                 double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed that one of the other teams goal flags is in sight. The flags map the posts of the goal and the center of the goal.

Specified by:
infoSeeFlagGoalOther in interface atan.model.ControllerPlayer
Parameters:
flag - possible values: LEFT, CENTER, RIGHT
distance - The distance to this flag.
direction - The direction of the flag.

infoSeeFlagGoalOwn

public void infoSeeFlagGoalOwn(atan.model.enums.Flag flag,
                               double distance,
                               double direction,
                               double distChange,
                               double dirChange,
                               double bodyFacingDirection,
                               double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed that one of our teams goal flags is in sight. The flags map the posts of the goal and the center of the goal.

Specified by:
infoSeeFlagGoalOwn in interface atan.model.ControllerPlayer
Parameters:
flag - possible values: LEFT, CENTER, RIGHT
distance - The distance to this flag.
direction - The direction of the flag.

infoSeeFlagLeft

public void infoSeeFlagLeft(atan.model.enums.Flag flag,
                            double distance,
                            double direction,
                            double distChange,
                            double dirChange,
                            double bodyFacingDirection,
                            double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed when one of the flags along the left touchline is in sight. The flags are positioned 5m behind the touchline.

Specified by:
infoSeeFlagLeft in interface atan.model.ControllerPlayer
Parameters:
flag - possible values: OWN_50, OWN_40, OWN_30, OWN_20, OWN_10, MID OTHER_10, OTHER_20, OTHER_30, OTHER_40, OTHER_50
distance - The distance to the flag.
direction - The direction of the flag.

infoSeeFlagOther

public void infoSeeFlagOther(atan.model.enums.Flag flag,
                             double distance,
                             double direction,
                             double distChange,
                             double dirChange,
                             double bodyFacingDirection,
                             double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed when one of the flags behind the other teams goal is in sight. These flags are positioned 5m behind the goal line.

Specified by:
infoSeeFlagOther in interface atan.model.ControllerPlayer
Parameters:
flag - possible values: LEFT_10, LEFT_20, LEFT_30, MID, RIGHT_10, RIGHT_20, RIGHT_30
distance - The distance to the flag.
direction - The direction of the flag.

infoSeeFlagOwn

public void infoSeeFlagOwn(atan.model.enums.Flag flag,
                           double distance,
                           double direction,
                           double distChange,
                           double dirChange,
                           double bodyFacingDirection,
                           double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed when one of the flags behind our teams goal is in sight. These flags are positioned 5m behind the goal line.

Specified by:
infoSeeFlagOwn in interface atan.model.ControllerPlayer
Parameters:
flag - possible values: LEFT_10, LEFT_20, LEFT_30, MID, RIGHT_10, RIGHT_20, RIGHT_30
distance - The distance to the flag.
direction - The direction of the flag.

infoSeeFlagPenaltyOther

public void infoSeeFlagPenaltyOther(atan.model.enums.Flag flag,
                                    double distance,
                                    double direction,
                                    double distChange,
                                    double dirChange,
                                    double bodyFacingDirection,
                                    double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed that one of the other teams penalty box flags is in sight. The flags map the outer most corners of the penalty box and the centre point between these corners.

Specified by:
infoSeeFlagPenaltyOther in interface atan.model.ControllerPlayer
Parameters:
flag - possible values: LEFT, CENTER, RIGHT
distance - The distance to this flag.
direction - The direction of this flag.

infoSeeFlagPenaltyOwn

public void infoSeeFlagPenaltyOwn(atan.model.enums.Flag flag,
                                  double distance,
                                  double direction,
                                  double distChange,
                                  double dirChange,
                                  double bodyFacingDirection,
                                  double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed that one of our teams penalty box flags is in sight. The flags map the outer most corners of the penalty box and the centre point between these corners.

Specified by:
infoSeeFlagPenaltyOwn in interface atan.model.ControllerPlayer
Parameters:
flag - possible values: LEFT, CENTER, RIGHT
distance - The distance to this flag.
direction - The direction of this flag.

infoSeeFlagRight

public void infoSeeFlagRight(atan.model.enums.Flag flag,
                             double distance,
                             double direction,
                             double distChange,
                             double dirChange,
                             double bodyFacingDirection,
                             double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed when one of the flags along the right touchline is in sight. The flags are positioned 5m behind the touchline.

Specified by:
infoSeeFlagRight in interface atan.model.ControllerPlayer
Parameters:
flag - possible values: OWN_50, OWN_40, OWN_30, OWN_20, OWN_10, MID, OTHER_10, OTHER_20, OTHER_30, OTHER_40, OTHER_50
distance - The distance to the flag.
direction - The direction of the flag.

infoSeeLine

public void infoSeeLine(atan.model.enums.Line line,
                        double distance,
                        double direction,
                        double distChange,
                        double dirChange,
                        double bodyFacingDirection,
                        double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed that one of the pitch lines are in sight.

Specified by:
infoSeeLine in interface atan.model.ControllerPlayer
distance - The distance to the line.
direction - The direction of the line.

infoSeePlayerOther

public void infoSeePlayerOther(int number,
                               boolean goalie,
                               double distance,
                               double direction,
                               double distChange,
                               double dirChange,
                               double bodyFacingDirection,
                               double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed that one of the other teams players is in sight.

Specified by:
infoSeePlayerOther in interface atan.model.ControllerPlayer
Parameters:
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.

infoSeePlayerOwn

public void infoSeePlayerOwn(int number,
                             boolean goalie,
                             double distance,
                             double direction,
                             double distChange,
                             double dirChange,
                             double bodyFacingDirection,
                             double headFacingDirection)
Description copied from interface: atan.model.ControllerPlayer
The controller is informed that one of it's own team is in sight.

Specified by:
infoSeePlayerOwn in interface atan.model.ControllerPlayer
Parameters:
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.

infoSenseBody

public void infoSenseBody(atan.model.enums.ViewQuality viewQuality,
                          atan.model.enums.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)
Specified by:
infoSenseBody in interface atan.model.ControllerPlayer
Parameters:
viewQuality - possible values: HIGH, LOW
viewAngle - possible values: NARROW, NORMAL, WIDE

postInfo

public void postInfo()
Description copied from interface: atan.model.ControllerPlayer
This is the method called one all the visual information has been processed.

Specified by:
postInfo in interface atan.model.ControllerPlayer

preInfo

public void preInfo()
Description copied from interface: atan.model.ControllerPlayer
This is the method called before the controller receives all the new visual information.

Specified by:
preInfo in interface atan.model.ControllerPlayer

setPlayer

public void setPlayer(atan.model.ActionsPlayer p)
Description copied from interface: atan.model.ControllerPlayer
Sets the player that the controller is controlling.

Specified by:
setPlayer in interface atan.model.ControllerPlayer
Parameters:
p - ActionsPlayer.

setType

public void setType(java.lang.String newType)
Description copied from interface: atan.model.ControllerPlayer
Set the players type.

Specified by:
setType in interface atan.model.ControllerPlayer
Parameters:
newType - what the type will now be

pause

private void pause(int ms)
Pause.

Parameters:
ms - the ms