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
|
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 java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
objects
public java.util.ArrayList objects
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 instanceagentInfo
- all infos of a player are stored in there- See Also:
ObjectInfo
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