robocraft.player
Class Message

java.lang.Object
  extended byrobocraft.player.Message

public final class Message
extends java.lang.Object

A Message is an object that can be broadcast to other robots. You may freely assign arrays or null to an instance's fields, and when the Message is broadcast it is copied into the receiving robots' message queues. Message instances may be mutated and rebroadcast.

See the specs for more information about communication.


Field Summary
 int[] ints
          An array of ints to broadcast.
 MapLocation[] locations
          An array of MapLocations to broadcast.
 java.lang.String[] strings
          An array of Strings to broadcast.
 
Constructor Summary
Message()
          Constructs an instance with a null value in each field.
 
Method Summary
 int getNumBytes()
          Returns the number of bytes in this message, which can be used to determine the cost of broadcasting it in energon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ints

public int[] ints
An array of ints to broadcast.


strings

public java.lang.String[] strings
An array of Strings to broadcast.


locations

public MapLocation[] locations
An array of MapLocations to broadcast.

Constructor Detail

Message

public Message()
Constructs an instance with a null value in each field.

Method Detail

getNumBytes

public int getNumBytes()
Returns the number of bytes in this message, which can be used to determine the cost of broadcasting it in energon.