Class OwnPlayerInfos

java.lang.Object
  |
  +--DynObject
        |
        +--PlayerInfos
              |
              +--OwnPlayerInfos
All Implemented Interfaces:
DebugInterface, StrategyGeneralInterface

public class OwnPlayerInfos
extends PlayerInfos
implements StrategyGeneralInterface

This class is used to represent all co- and opponent players all atributes of superclass PlayerInfos plus:

Version:
1.00
Author:
Daniel Förderer and Moritz Steiner

Field Summary
 AudioInfo audioInfo
           
private  java.util.LinkedList audioInfos
           
private  int audioInfoSize
           
private  int dashCount
           
private  double effort
           
private  int kickCount
           
private  int oppGoal
           
private  int ourGoal
           
private  int playMode
           
private  double recovery
           
private  int sayCount
           
private  char side
           
private  double stamina
           
private  int turnCount
           
private  int turnNeckCount
           
private  boolean viewQual
           
private  int viewWidth
           
 
Fields inherited from class PlayerInfos
dirBody, dirHead, number
 
Fields inherited from class DynObject
dirChange, dirVector, formerDirVector, formerPosition, formerTime, position, speedChange, time
 
Fields inherited from interface StrategyGeneralInterface
AUDIO_CUT_DIST, BALL_DECAY, BALL_RAND, BALL_SIZE, BALL_SPEED_MAX, BALL_WEIGHT, CATCH_BAN_CYCLE, CATCH_PROBABILITY, CATCHABLE_AREA_L, CATCHABLE_AREA_W, CKICK_MARGIN, DASH_POWER_RATE, EFFORT_DEC, EFFORT_DEC_THR, EFFORT_INC, EFFORT_INC_THR, EFFORT_MIN, FORMATION_244, FORMATION_433, FORMATION_541, FORMATION_CATENAGIO, FORMATIONS_NUM_OF, GOAL_CENTER_POINT, GOAL_WIDTH, HEAR_DECAY, HEAR_INC, HEAR_MAX, INERTIA_MOMENT, KICK_POWER_RATE, KICKABLE_AREA, KICKABLE_MARGIN, MAX_AUDIOINFO, MAX_DASH_PER_CYCLE, MAXMOMENT, MAXPOWER, MIN_STAMINA, MINMOMENT, MINPOWER, NECK, OFFSIDE_ACTIVE_AREA_SIZE, PENALTY_AREA_X_WIDTH, PENALTY_AREA_Y_WIDTH, PLAYER_DECAY, PLAYER_RAND, PLAYER_SIZE, PLAYER_SPEED_MAX, PLAYER_WEIGHT, PORT, RECOVER_DEC, RECOVER_DEC_THR, RECOVER_MIN, RECV_STEP, SEND_STEP, SENSE_BODY_STEP, SIMULATOR_STEP, SKILL_CENTER_EGDE_OF_VIEW, SKILL_CONST_SLOPE, SKILL_DEC_SLOPE, SKILL_DESTINATION_DASH, SKILL_DISTANCE_DASH, SKILL_DYNOBJ_DASH, SKILL_DYNOBJ_SHOOT, SKILL_FIX_ANGLE_TURN, SKILL_FIX_ANGLE_TURN_NECK, SKILL_HIGH_PRECISION, SKILL_INC_SLOPE, SKILL_INFINIT, SKILL_KOORD_SHOOT, SKILL_LEFT_EGDE_OF_VIEW, SKILL_LOW_PRECISION, SKILL_MEDIUM_PRECISION, SKILL_RIGHT_EGDE_OF_VIEW, SKILL_TO_COORDINATES_TURN, SKILL_TO_COORDINATES_TURN_NECK, SKILL_TO_DYNOBJ_TURN, STAMINA_INC_MAX, STAMINA_MAX, STRATEGIES, STRATEGY_FLAG_OPPGOAL, STRATEGY_FLAG_PUMP, STRATEGY_FLAG_TESTFLAG, VISIBLE_ANGLE
 
Fields inherited from interface DebugInterface
DEBUG_SWITCH_STRATEGY_IS_SET, DEBUG_SWITCH_VISUALISATION_IS_SET, DEBUG_SWITCH_WORLDMODEL_AUDIOEVENT_IS_SET, DEBUG_SWITCH_WORLDMODEL_BODYEVENT_IS_SET, DEBUG_SWITCH_WORLDMODEL_VISUALEVENT_IS_SET
 
Constructor Summary
(package private) OwnPlayerInfos()
          constructor for an OwnPlayerIinfo object with all its parameters initialized with 0, NaN or false
(package private) OwnPlayerInfos(int time, java.awt.geom.Point2D.Double position, java.awt.geom.Point2D.Double formerPosition, java.awt.geom.Point2D.Double dirVector, java.awt.geom.Point2D.Double formerDirVector, double speedChange, double dirChange, double dirBody, double dirHead, int number, double stamina, double effort, boolean viewQual, int viewWidth, int kickCount, int dashCount, int turnCount, int sayCount, int turnNeckCount, AudioInfo audioInfo, char side, int ourGoal, int oppGoal, int playMode, double recovery)
          constructor for an OwnPlayerInfos objects which contains all informations about a player
 
Method Summary
 void addAudioInfo(AudioInfo audioInfo)
          adds a new audioinfo to the message queue, if size of audioInfos exceeds MAX_AUDIOINFO it gets resized
 void decRecovery()
          Sets the recovery.
 AudioInfo getAudioInfo()
          returns the first AudioInfo in the list
 java.util.ListIterator getAudioInfoList()
          returns the whole AudioInfo list
 int getDashCount()
          gets the dash count of the player
 double getEffort()
          gets the effort it takes the player to act
 int getKickCount()
          gets the kick count of the player
 int getOppGoal()
          gets number of goals of the opp team
 int getOurGoal()
          gets number of goals of our team
 int getPlayMode()
          gets the play mode
 double getRecovery()
          Returns the recovery.
 int getSayCount()
          gets the say count of the player
 char getSide()
          gets playing side of the team
 double getStamina()
          gets the stamina of the player
 int getTurnCount()
          gets the turn count of the player
 int getTurnNeckCount()
          gets the turn-neck count of the player
 boolean getViewQual()
          gets the view-qaulity of the player
 int getViewWidth()
          gets the view-width of the player
 void resetRecovery()
          Sets the recovery.
 void setDashCount(int dashCount)
          sets the dash count of the player
 void setEffort(double effort)
          sets the effort it takes the player to act
 void setKickCount(int kickCount)
          sets the kick count of the player
 void setOppGoal(int oppGoal)
          sets number of goals of the opp team
 void setOurGoal(int ourGoal)
          sets number of goals of our team
 void setPlayMode(int playMode)
          sets the play mode
 void setSayCount(int sayCount)
          sets the say count of the player
 void setSide(char side)
          sets playing side of the team
 void setStamina(double stamina)
          sets the stamina of the player
 void setTurnCount(int turnCount)
          sets the turn count of the player
 void setTurnNeckCount(int turnNeckCount)
          sets the turn-neck count of the player
 void setViewQual(boolean viewQual)
          sets the view-qaulity of the player
 void setViewWidth(int viewWidth)
          sets the view-width of the player
 
Methods inherited from class PlayerInfos
getDirBody, getDirHead, getNumber, print, setDirBody, setDirHead, setNumber
 
Methods inherited from class DynObject
getDirChange, getDirVector, getFormerDirVector, getFormerPosition, getPosition, getSpeedChange, getTime, setPosition, setTime
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

stamina

private double stamina

effort

private double effort

viewQual

private boolean viewQual

viewWidth

private int viewWidth

kickCount

private int kickCount

dashCount

private int dashCount

turnCount

private int turnCount

sayCount

private int sayCount

turnNeckCount

private int turnNeckCount

side

private char side

ourGoal

private int ourGoal

oppGoal

private int oppGoal

playMode

private int playMode

recovery

private double recovery

audioInfo

public AudioInfo audioInfo

audioInfos

private java.util.LinkedList audioInfos

audioInfoSize

private int audioInfoSize
Constructor Detail

OwnPlayerInfos

OwnPlayerInfos()
constructor for an OwnPlayerIinfo object with all its parameters initialized with 0, NaN or false

OwnPlayerInfos

OwnPlayerInfos(int time,
               java.awt.geom.Point2D.Double position,
               java.awt.geom.Point2D.Double formerPosition,
               java.awt.geom.Point2D.Double dirVector,
               java.awt.geom.Point2D.Double formerDirVector,
               double speedChange,
               double dirChange,
               double dirBody,
               double dirHead,
               int number,
               double stamina,
               double effort,
               boolean viewQual,
               int viewWidth,
               int kickCount,
               int dashCount,
               int turnCount,
               int sayCount,
               int turnNeckCount,
               AudioInfo audioInfo,
               char side,
               int ourGoal,
               int oppGoal,
               int playMode,
               double recovery)
constructor for an OwnPlayerInfos objects which contains all informations about a player
Method Detail

getStamina

public double getStamina()
gets the stamina of the player

setStamina

public void setStamina(double stamina)
sets the stamina of the player

getEffort

public double getEffort()
gets the effort it takes the player to act

setEffort

public void setEffort(double effort)
sets the effort it takes the player to act

getViewQual

public boolean getViewQual()
gets the view-qaulity of the player
Returns:
false=low, true=high

setViewQual

public void setViewQual(boolean viewQual)
sets the view-qaulity of the player
Parameters:
false=low, - true=high

getViewWidth

public int getViewWidth()
gets the view-width of the player
Returns:
0=narrow, 1=normal, 2=wide

setViewWidth

public void setViewWidth(int viewWidth)
sets the view-width of the player
Parameters:
0=narrow, - 1=normal, 2=wide

getKickCount

public int getKickCount()
gets the kick count of the player

setKickCount

public void setKickCount(int kickCount)
sets the kick count of the player

getDashCount

public int getDashCount()
gets the dash count of the player

setDashCount

public void setDashCount(int dashCount)
sets the dash count of the player

getTurnCount

public int getTurnCount()
gets the turn count of the player

setTurnCount

public void setTurnCount(int turnCount)
sets the turn count of the player

getSayCount

public int getSayCount()
gets the say count of the player

setSayCount

public void setSayCount(int sayCount)
sets the say count of the player

getTurnNeckCount

public int getTurnNeckCount()
gets the turn-neck count of the player

setTurnNeckCount

public void setTurnNeckCount(int turnNeckCount)
sets the turn-neck count of the player

getSide

public char getSide()
gets playing side of the team

setSide

public void setSide(char side)
sets playing side of the team

getOurGoal

public int getOurGoal()
gets number of goals of our team

setOurGoal

public void setOurGoal(int ourGoal)
sets number of goals of our team

getOppGoal

public int getOppGoal()
gets number of goals of the opp team

setOppGoal

public void setOppGoal(int oppGoal)
sets number of goals of the opp team

getPlayMode

public int getPlayMode()
gets the play mode

setPlayMode

public void setPlayMode(int playMode)
sets the play mode

addAudioInfo

public void addAudioInfo(AudioInfo audioInfo)
adds a new audioinfo to the message queue, if size of audioInfos exceeds MAX_AUDIOINFO it gets resized

getAudioInfo

public AudioInfo getAudioInfo()
returns the first AudioInfo in the list

getAudioInfoList

public java.util.ListIterator getAudioInfoList()
returns the whole AudioInfo list

getRecovery

public double getRecovery()
Returns the recovery.
Returns:
double

decRecovery

public void decRecovery()
Sets the recovery.
Parameters:
recovery - The recovery to set

resetRecovery

public void resetRecovery()
Sets the recovery.
Parameters:
recovery - The recovery to set