// Objects in Soccer Server (SEE data). class ObjectInfo { public String m_type; public float m_distance; public float m_direction; public float m_distChange; public float m_dirChange; public float m_bodyDir; //added from verion.5 public float m_HeadDir; // public ObjectInfo(String type) { m_type = type; } public void print() { System.out.println("ObjectInfo [type]=\t" + m_type); System.out.println(" [distance, direction]=\t" + m_distance + "\t" + m_direction); System.out.println(" [distChange, dirChnage]=\t" + m_distChange + "\t" + m_dirChange); System.out.println(" [bodyDir., HeadDir.]=\t" + m_bodyDir + "\t" + m_HeadDir); } } // This class holds visual information about player class PlayerInfo extends ObjectInfo { String m_teamName; int m_uniformName; public PlayerInfo() { super("player"); } public PlayerInfo(String team, int number) { super("player"); m_teamName = team; m_uniformName = number; } public void print() { super.print(); System.out.println(" {teamname, number}=\t" + m_teamName +"\t" + m_uniformName); } } // This class holds visual information about goal class GoalInfo extends ObjectInfo { char m_side; public GoalInfo() { super("goal"); } public GoalInfo(char side) { super("goal"); m_side = side; } public void print() { super.print(); System.out.println(" {side}=\t" + m_side); } } // This class holds visual information about ball class BallInfo extends ObjectInfo { public BallInfo() { super("ball"); } } // This class holds visual information about flag /* class FlagInfo extends ObjectInfo { char m_area; // 'p' - penalty area flag char m_horiz; // [l|c|r] [l|r|t|b] [l|r] [t|b] char m_vert; // [t|b] 0 [t|c|b] [l|r] int m_no; // 10|20|30|40|50 public FlagInfo() { super("flag"); } public FlagInfo(char type, char posH, char posV, int number) { super("flag"); m_area = type; m_horiz = posH; m_vert = posV; m_no = number; } public void print() { super.print(); System.out.println(" {area, hori, vert, no}=\t" + m_area + "\t" + m_horiz + "\t" + m_vert + "\t" + m_no); } } */ // This class holds visual information about line class LineInfo extends ObjectInfo { char m_kind; // l|r|t|b public LineInfo() { super("line"); } public LineInfo(char kind) { super("line"); m_kind = kind; } public void print() { super.print(); System.out.println(" {kind}=\t " + m_kind); } }