AI for Games 1.1.1
|
Public Member Functions | |
void | deleteAllTelegrams () |
Static Public Member Functions | |
static void | dispatch (long delay_ms, int sender, int receiver, int msg, Object ... eInfo) |
static void | update () |
Static Private Member Functions | |
static void | sendTelegram (int receiver, Telegram tgram) |
Static Private Attributes | |
static TreeSet< Telegram > | telegrams = new TreeSet<Telegram>() |
This class is responsible for storing and dispatching messages between entities
void game2dai.fsm.Dispatcher.deleteAllTelegrams | ( | ) |
Remove all outstanding telegrams - useful if reseting a game or simulation
|
static |
Dispatch a telegram to another entity with optional delay and any extra information supplied
delay_ms | the delay (in milliseconds) before the telegram is to be sent |
sender | the ID of the entity sending the message |
receiver | the ID of the entity to receive the telegram |
msg | unique integer identifying the message |
eInfo | additional information as required - the receiver will know what there is. |
|
static |
Called by the world update - will send any telegrams ready for processing
The set of telegrams still to be processed.