Class BodyEvent
java.lang.Object
|
+--Event
|
+--BodyEvent
- All Implemented Interfaces:
- DebugInterface
- public class BodyEvent
- extends Event
- implements DebugInterface
This class is used as an indicator that a sense_body
message was
was received. This type of message is needed to synchronize the actions of the
Player
with the action cylces of the server. The see
messages arrive in intervals of 150ms, while the action cycle whithin one
command can be sent is 100ms. Only sense_body
messages arrive within
this cycle time.
- Version:
- 1.00
- Author:
- Daniel Förderer and Moritz Steiner
Constructor Summary |
BodyEvent(java.lang.String message,
AgentInfo agentInfo)
constructor that also starts the parsing of the message |
Method Summary |
boolean |
isBodyEvent()
indicates that the event is of type BodyEvent |
private void |
parse(java.lang.String message,
AgentInfo agentInfo)
Takes a 'sense-body' message from the server and parses the information
it contains into AgentInfo.Own used by the player. |
void |
print(AgentInfo agentInfo)
Converts the information in the class into readable output.
usefull for debugging |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
BodyEvent
public BodyEvent(java.lang.String message,
AgentInfo agentInfo)
- constructor that also starts the parsing of the message
isBodyEvent
public boolean isBodyEvent()
- indicates that the event is of type
BodyEvent
- Overrides:
isBodyEvent
in class Event
- Returns:
- a
boolean
value indicating that this event is a
BodyEvent
parse
private void parse(java.lang.String message,
AgentInfo agentInfo)
- Takes a 'sense-body' message from the server and parses the information
it contains into AgentInfo.Own used by the player.
print
public void print(AgentInfo agentInfo)
- Converts the information in the class into readable output.
usefull for debugging