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.
MessageEvent
public MessageEvent(String sender,
Serializable message)
- Called by the game to create a new MessageEvent.
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