robocode
Class MessageEvent
- Comparable
public class MessageEvent
A MessageEvent is sent to
onMessageReceived()
when a teammate sends a message to your robot.
You can use the information contained in this event to determine what to do.
- Mathew A. Nelson (original)
MessageEvent(String sender, Serializable message) - Called by the game to create a new MessageEvent.
|
Serializable | getMessage() - Returns the message itself.
|
String | getSender() - Returns the name of the sending robot.
|
MessageEvent
public MessageEvent(String sender,
Serializable message)
Called by the game to create a new MessageEvent.
sender
- the name of the sending robotmessage
- the message for your robot
getMessage
public Serializable getMessage()
Returns the message itself.
getSender
public String getSender()
Returns the name of the sending robot.
- the name of the sending robot