betir
Class RobocupEnvironment

java.lang.Object
  |
  +--betir.RobocupEnvironment

public class RobocupEnvironment
extends java.lang.Object

This is the class that keeps track of the position of the player and all that he sees, and calculates the absolute position of all objects.


Field Summary
 java.util.ArrayList m_aobjEnemies
           
 java.util.ArrayList m_aobjFlags
           
 java.util.ArrayList m_aobjFriends
           
 java.util.ArrayList m_aobjLines
           
 java.util.ArrayList m_aYells
           
 boolean m_bAbsAngle
          a lock used for certain things when accuarcy is important, only set to true when new data is recieved from soccer server and is set to false when a player turns or dashes
 boolean m_bHasBall
           
static ConfigurationData m_cfgData
           
 java.util.HashMap m_hashStatic
          the flags
 int m_nCurrentTime
           
 int m_nZone
           
 ObjectInfo m_objBall
           
 ObjectInfo m_objGoal
           
 SelfInfo m_objSelf
           
 Player m_Player
          a reference to self to allow the adding of behaviors at any time
 java.lang.String m_strPlayMode
           
 TwoDVec m_vecPosition
          position of self
 
Constructor Summary
RobocupEnvironment(ConfigurationData cfgData, boolean display, SelfInfo self)
           
 
Method Summary
 void CalcAbsolute()
           
 void debug()
          prints out info useful for debuging
 TwoDVec getAbsolutePos(ObjectInfo theObj)
           
 void parse(java.lang.String data)
          parse the data recieved from the robocup server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_cfgData

public static ConfigurationData m_cfgData

m_nCurrentTime

public int m_nCurrentTime

m_nZone

public int m_nZone

m_objBall

public ObjectInfo m_objBall

m_objSelf

public SelfInfo m_objSelf

m_aobjFlags

public java.util.ArrayList m_aobjFlags

m_aobjLines

public java.util.ArrayList m_aobjLines

m_aobjFriends

public java.util.ArrayList m_aobjFriends

m_aobjEnemies

public java.util.ArrayList m_aobjEnemies

m_objGoal

public ObjectInfo m_objGoal

m_aYells

public java.util.ArrayList m_aYells

m_strPlayMode

public java.lang.String m_strPlayMode

m_bAbsAngle

public boolean m_bAbsAngle
a lock used for certain things when accuarcy is important, only set to true when new data is recieved from soccer server and is set to false when a player turns or dashes

m_hashStatic

public java.util.HashMap m_hashStatic
the flags

m_vecPosition

public TwoDVec m_vecPosition
position of self

m_bHasBall

public boolean m_bHasBall

m_Player

public Player m_Player
a reference to self to allow the adding of behaviors at any time
Constructor Detail

RobocupEnvironment

public RobocupEnvironment(ConfigurationData cfgData,
                          boolean display,
                          SelfInfo self)
                   throws java.net.SocketException,
                          java.io.IOException
Method Detail

parse

public void parse(java.lang.String data)
parse the data recieved from the robocup server.
Parameters:
data -  

debug

public void debug()
prints out info useful for debuging

CalcAbsolute

public void CalcAbsolute()

getAbsolutePos

public TwoDVec getAbsolutePos(ObjectInfo theObj)