Class VisualEvent

java.lang.Object
  |
  +--Event
        |
        +--VisualEvent
All Implemented Interfaces:
DebugInterface

public class VisualEvent
extends Event
implements DebugInterface

This class parses all messages regarding visual information of the game, i.e. the see messages, and represents the information in a list of ObjectInfo

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

Field Summary
 java.util.ArrayList objects
           
 
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
VisualEvent(java.lang.String message, AgentInfo agentInfo)
          Creates a new VisualEvent instance, extracts the information contained and stores it in a list of ObjectInfo
 
Method Summary
private  void compute(java.util.ArrayList objects, AgentInfo agentInfo, java.lang.String message)
          Takes the ArrayLsit objects created by parse, computes the absolute positions and stores them in AgentInfo
 boolean isVisualEvent()
          indicates that the event is of type VisualEvent
private  void parse(java.lang.String message, AgentInfo agentInfo)
          Takes a 'see' message from the server and parses the information it contains into a list of visual data that is used by the player.
 
Methods inherited from class Event
isAudioEvent, isBodyEvent
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

objects

public java.util.ArrayList objects
Constructor Detail

VisualEvent

public VisualEvent(java.lang.String message,
                   AgentInfo agentInfo)
Creates a new VisualEvent instance, extracts the information contained and stores it in a list of ObjectInfo
Parameters:
message - a String value which contains the see message of the rcssserver to be parsed and stored in the instance
agentInfo - all infos of a player are stored in there
See Also:
ObjectInfo
Method Detail

isVisualEvent

public boolean isVisualEvent()
indicates that the event is of type VisualEvent
Overrides:
isVisualEvent in class Event
Returns:
a boolean value indicating that this event is a VisualEvent

parse

private void parse(java.lang.String message,
                   AgentInfo agentInfo)
Takes a 'see' message from the server and parses the information it contains into a list of visual data that is used by the player.

compute

private void compute(java.util.ArrayList objects,
                     AgentInfo agentInfo,
                     java.lang.String message)
Takes the ArrayLsit objects created by parse, computes the absolute positions and stores them in AgentInfo