dk.itu.smds.torusman
Interface Man

All Known Implementing Classes:
LocalMan

public interface Man

Interface for structure holding current board for a man, along with callback handles for contacting the man.


Method Summary
 void deserialize(java.io.DataInputStream in)
          Deserialize this man from a stream.
 byte getManId()
          The id of the man.
 byte getX()
          X coordinate of current board that the man is on.
 byte getY()
          Y coordinate of current board that the man is on.
 void movedTo(ManData manData)
          Callback handle to be invoked when a man has moved to a new position.
 void serialize(java.io.DataOutputStream out)
          Serialize this man to a stream.
 void updatePoints(Scores scores)
          Callback handle to be invoked when scores have been updated.
 

Method Detail

getManId

byte getManId()
The id of the man.


getX

byte getX()
X coordinate of current board that the man is on.


getY

byte getY()
Y coordinate of current board that the man is on.


movedTo

void movedTo(ManData manData)
Callback handle to be invoked when a man has moved to a new position.

Parameters:
manData -

updatePoints

void updatePoints(Scores scores)
Callback handle to be invoked when scores have been updated.

Parameters:
scores - Table mapping teamId to team points.

serialize

void serialize(java.io.DataOutputStream out)
               throws java.io.IOException
Serialize this man to a stream.

Throws:
java.io.IOException

deserialize

void deserialize(java.io.DataInputStream in)
                 throws java.io.IOException
Deserialize this man from a stream.

Throws:
java.io.IOException