robocode
Class MessageEvent

java.lang.Object
  |
  +--robocode.Event
        |
        +--robocode.MessageEvent
All Implemented Interfaces:
Comparable

public class MessageEvent
extends Event

A MessageEvent is sent to TeamRobot.onMessageReceived(robocode.MessageEvent) when a teammate sends you a message. You can use the information contained in this event to determine what to do.


Constructor Summary
MessageEvent(String sender, Serializable message)
          Called by the game to create a new MessageEvent.
 
Method Summary
 Serializable getMessage()
          Returns the message itself.
 String getSender()
          Returns the name of the sending robot
 
Methods inherited from class robocode.Event
compareTo, getPriority, getTime, setPriority, setTime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageEvent

public MessageEvent(String sender,
                    Serializable message)
Called by the game to create a new MessageEvent.

Method Detail

getSender

public String getSender()
Returns the name of the sending robot

Returns:
the name of the sending robot

getMessage

public Serializable getMessage()
Returns the message itself.

Returns:
the message