The Display Server fundamentally consists of two main components.
- Player Status Messages - These messages determine the status of each participant in the Kleptomania game system.The format of the status message is
STATUS:player-name:status-string
As one can see, the tokens in the message are separated by the colon character. So far, we have categorized the following states that a player might be in at any given time
- IDLE state - where the player is waiting for his/her strategy system for further instructions.
- INJAIL state - where the player is in the penalty box, after being caught by a monitoring system.
- REGISTERED state - where the player has just registerd to enter into a monitoring system area.
These state messages are sent by the Control System of the Kleptomania infrastructure. There are additional states of player's that the can be determined from the dialog messages coming from each individual strategy system.
- STEAL area-name state - where a strategy system has just instructed one of its players to go, steal from a particular monitored area.
- SPY area-name state - where a strategy system has just instructed one of its players to go, spy at some particular monitored area.
- Dialog Messages - These are the ongoing dialogs at each individual strategy system's terminal. The strategy systems must send these in the following format
DIALOG:team-name:dialog-string
So as the extract the potential status information of a player embedded in a dialog message (like STEAL, and SPY), the Communications component has to parse each incoming dialog message.
- Clock messages - These are the period messages sent by the Control system denoting the current logical period of activity. The characteristics of each period may be looked up in the Control System's documentation. The format of these messages is
CLOCK:period-name:time-in-secs
where the period-name may be RED, BLUE, GREEN, or YELLOW.
- Alarm messages - These messages are sent by the Control system informing the triggering of an alarm in an area. The format of this message is
ALARM:area-name:player-name
The Communications component listens currently to port 4123 for any incoming connection requests from either the Control system, or any of the Strategy systems. It spawns a new thread for each new communication session subsequently.