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.

Returns:
the man id

getX

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

Returns:
the X

getY

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

Returns:
the Y

movedTo

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

Parameters:
manData - the man data

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.

Parameters:
out - the out
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

deserialize

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

Parameters:
in - the in
Throws:
java.io.IOException - Signals that an I/O exception has occurred.